【发布时间】:2019-08-03 00:37:06
【问题描述】:
我正在开发一个 Xamarin 项目。在 C# 代码的帮助下,我需要为我的项目访问 azure API。它会产生以下错误“无法创建安全通道”。所以我正在使用以下代码行
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;
但在添加该行之后,它也会引发相同的错误。
但是当我从控制台应用程序编译相同的代码时,它会产生结果。我的代码或移动设备有问题吗?
【问题讨论】:
-
我找不到那个路径...项目选项->android 选项->高级。那在项目哪里???
-
这将在您的 Xamarin.Android 应用程序项目中。
-
只有我找不到选项。
-
Windows:
Project Options > Android Options, then click the Advanced Options button.Mac:Project Options > Build > Android Build settings and click on the General tab.
标签: c# azure xamarin tls1.2 azure-api-apps