Ios 使用Cassini的SSL身份验证

Ios 使用Cassini的SSL身份验证,ios,iis,ssl,nsurlconnection,cassini,Ios,Iis,Ssl,Nsurlconnection,Cassini,我们可以用以下方法来处理超卡西尼号吗?据我所知,这是非常好的IIS - (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace { return [protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMetho

我们可以用以下方法来处理超卡西尼号吗?据我所知,这是非常好的IIS

- (BOOL)connection:(NSURLConnection *)connection canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace {
  return [protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust];
}

- (void)connection:(NSURLConnection *)connection didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge {
  if ([challenge.protectionSpace.authenticationMethod isEqualToString:NSURLAuthenticationMethodServerTrust])
    if ([trustedHosts containsObject:challenge.protectionSpace.host])
      [challenge.sender useCredential:[NSURLCredential credentialForTrust:challenge.protectionSpace.serverTrust] forAuthenticationChallenge:challenge];

  [challenge.sender continueWithoutCredentialForAuthenticationChallenge:challenge];
}

谢谢

我不确定卡西尼号是否具有内置的身份验证级别,但我有点怀疑。我很确定你应该能够使用IIS Express,它将取代卡西尼号


查看有关IIS Express的信息。

你说得对,Cassini没有身份验证和HTTPS,我还发现HTTPS可以与ultiDev Cassini web服务器一起使用HttpVPN代理…谢谢你的链接和评论。