如何在iPhone上执行NTLM挑战 [英] How to perform an NTLM challenge on the iPhone
问题描述
我正在尝试访问iPhone应用程序中的某些Web服务。
如果我 GET
到.asmx页面,我按预期验证并获取WSDL。
但是,如果我 POST
到.asmx页面,设置SOAPAction,Content-Type,Content-Length和HTTPBody,我只是不断收到 didReceiveAuthenticationChallenge
消息。
<另外,我正在尝试使用集成Windows身份验证(IWA)POST到IIS,这意味着我正在尝试协商NTLM质询。
我很遗憾地找到了答案。 NSURLConnection无法进行NTLM身份验证。这是一篇关于如何使用CFNetwork堆栈进行NTLM身份验证的帖子。
找到比做更好的东西所有这些乏味:已经做过的人了!
ASIHTTPRequest
更新:有一个 iOS 4的解决方法,允许再次进行NTLM身份验证
I'm trying to access some web services in an iPhone application.
If I GET
to the .asmx page, I authenticate and get the WSDL as expected.
However, if I POST
to the .asmx page, setting the SOAPAction, Content-Type, Content-Length, and HTTPBody, I just keep getting didReceiveAuthenticationChallenge
messages.
Additionally, I'm trying to POST to IIS using Integrated Windows Authentication (IWA), which means I'm trying to negotiate an NTLM challenge.
I unfortunately found my answer. NSURLConnection cannot do NTLM authentication. Here's a post about how to do NTLM authentication using the CFNetwork stack.
HTTP Post via the CFNetwork stack
Found something even better than doing all of that tediousness: Someone who has already done it!
ASIHTTPRequest
Update: There is a workaround for iOS 4 that allows for NTLM authentication again
这篇关于如何在iPhone上执行NTLM挑战的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!