【问题标题】:iOS consume WCF Service using HTTPSiOS 使用 HTTPS 使用 WCF 服务
【发布时间】:2011-12-02 11:43:40
【问题描述】:

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

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

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

【问题讨论】:

    标签: ios web-services wcf-security wcf


    【解决方案1】:

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

    - (BOOL)connection:(NSURLConnection *)conn canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *)protectionSpace
    
    - (void)connection:(NSURLConnection *)conn didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge *)challenge
    

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

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

    【讨论】:

      猜你喜欢
      • 2011-08-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-04-20
      • 2012-09-04
      相关资源
      最近更新 更多