更新时间:2023-02-11 16:58:45
否。为各种框架版本启用的默认协议为:
No. The default protocols enabled for the various framework versions are:
您可以使用 ServicePointManager
类指定应用程序支持的协议,特别是通过设置 SecurityProtocol
属性,在您的情况下,您需要将其设置为以下内容:
You can specify which protocols your application supports by using the ServicePointManager
class, specifically by setting the SecurityProtocol
property, which in your case you would want to set to the following:
System.Net.ServicePointManager.SecurityProtocol =
SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12;