在我的应用程序中,我正在尝试连接到IIS服务器以访问某些服务器.当我在iOS 4或更早版本中运行应用程序时,连接正常,但是当我在iOS 5中运行时,连接会返回此错误:
Error Domain=ASIHTTPRequestErrorDomain Code=1 "A connection failure occurred" UserInfo=0x6b601d0 {NSUnderlyingError=0x6b5fe20 "The operation couldn’t be completed. (OSStatus error -9836.)", NSLocalizedDescription=A connection failure occurred}
Run Code Online (Sandbox Code Playgroud)
这是我打电话的代码:
self.currentRequest = [ASIHTTPRequest requestWithURL:url];
[self.currentRequest setValidatesSecureCertificate:NO];
[self.currentRequest setDelegate:self];
[self.currentRequest setUsername:credentials.login];
[self.currentRequest setPassword:credentials.password];
[self.currentRequest setDomain:@"CORP"];
[self.currentRequest setUseHTTPVersionOne:YES];
[self.currentRequest setTimeOutSeconds:120];
[self.currentRequest startAsynchronous];
Run Code Online (Sandbox Code Playgroud)
有人知道为什么会这样吗?