|
.net框架的默认协议:
- NET Framework 4.5 and 4.5.1: SSLv3 and TLSv1
- NET Framework 4.5.2: SSLv3, TLSv1, and TLSv1.1
- NET Framework 4.6 and higher: TLSv1, TLSv1.1, and TLS1.2
如果服务器协议有限制或者升级,需要修改代码中的安全协议。ps:全局配置
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Tls;
|