【问题标题】:NSURLSession/NSURLConnection HTTP load failed (kCFStreamErrorDomainSSL, -9802) Xamarin.Forms IOSNSURLSession/NSURLConnection HTTP 加载失败 (kCFStreamErrorDomainSSL, -9802) Xamarin.Forms IOS
【发布时间】:2019-05-01 09:23:44
【问题描述】:

我开发了 Web view To Navigate to web demo , URL 是

https://demos.xretail.com

我用

编辑了 info.plist
  <dict>
    <key>NSExceptionAllowsInsecureHTTPLoads</key>
    <true/>
  </dict>
  <key>NSAppTransportSecurity</key>
  <dict>
    <key>NSExceptionDomains</key>
    <dict>
      <key>www.the-domain-name.com</key>
      <dict>
        <key>NSExceptionMinimumTLSVersion</key>
        <string>TLSv1.0</string>
        <key>NSExceptionRequiresForwardSecrecy</key>
        <false/>
        <key>NSExceptionAllowsInsecureHTTPLoads</key>
        <true/>
        <key>NSIncludesSubdomains</key>
        <true/>
        <key> NSAllowsArbitraryLoadsInWebContent</key>
        <true/>
        <key>NSAllowsArbitraryLoads</key>
        <true/>
      </dict>
    </dict>
  </dict>

我在应用程序委托中使用 paybass 证书,但它对我不起作用

  ServicePointManager
.ServerCertificateValidationCallback +=
(sender, cert, chain, sslPolicyErrors) => true;

【问题讨论】:

  • 设置 the-domain-name.com 而不是 www.the-domain-name.com
  • 还是同样的问题
  • 你可以在你的设备中访问带有 safari 的 url 吗?
  • @AmrKamal 你解决了吗?

标签: ios ssl xamarin.forms xamarin.ios


【解决方案1】:

您可以尝试更改iOS 构建设置吗?

  1. 更改 HttpClient 实现使用 NSUrlSession

【讨论】:

  • ssl/tsl 实现选项在哪里?
  • 只要改一下Http客户端实现我觉得就可以解决问题了
  • 你能尝试添加这个键吗 NSAppTransportSecurityNSTemporaryExceptionAllowsInsecureHTTPLoadsNSIncludesSubdomainsNSAllowsArbitraryLoads
  • 在我上面提到之前已经添加但对我不起作用
猜你喜欢
  • 2015-09-04
  • 2015-12-29
  • 1970-01-01
  • 2016-01-03
  • 1970-01-01
  • 1970-01-01
  • 2017-06-10
  • 2016-01-18
  • 2015-10-18
相关资源
最近更新 更多