OGeek|极客世界-中国程序员成长平台

标题: iOS 使用 HTTPS 使用 WCF 服务 [打印本页]

作者: 菜鸟教程小白    时间: 2022-12-13 10:05
标题: iOS 使用 HTTPS 使用 WCF 服务

我正在开发一个 iPad 应用程序,它将使用 WCF 服务 HTTPS(可能使用肥皂)。

我在 iPad 上使用 NSURLConnection 连接到 HTTP 网络服务并且工作正常。但是 WCF 服务将使用 HTTPS。 WCF 作为一些不同的配置(例如安全模式:Transport、Message 和 TransportWithMessageCredential)。

iPad 使用 HTTPS 使用 WCF 服务是否有任何限制?最好的方法是什么?



Best Answer-推荐答案


您可以使用 NSURLConnection 本身。如果您想在连接到服务器时处理安全凭据,您必须查看以下方法,

- (BOOL)connectionNSURLConnection *)conn canAuthenticateAgainstProtectionSpaceNSURLProtectionSpace *)protectionSpace

- (void)connectionNSURLConnection *)conn didReceiveAuthenticationChallengeNSURLAuthenticationChallenge *)challenge

以下来自 Apple 的示例项目将为您提供帮助,

http://developer.apple.com/library/ios/#samplecode/AdvancedURLConnections/Introduction/Intro.html

关于iOS 使用 HTTPS 使用 WCF 服务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8355832/






欢迎光临 OGeek|极客世界-中国程序员成长平台 (http://sqlite.in/) Powered by Discuz! X3.4