解决办法:让客户端启用该协议。具体就是在发起网络请求之前确保ServicePointManager.SecurityProtocol中含有服务端所用的安全协议,如果不知道或希望客户端健壮一点,当然最简单的方式就是把所有可用的协议都启用,随你服务端将来怎么换。代码如下:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3
| SecurityProtocolType.Tls
| SecurityProtocolType.Tls11
| SecurityProtocolType.Tls12;
但如果客户端是基于.net framework 4.0,SecurityProtocolType枚举中并没有Tls11和Tls12,这就需要直接填值:
ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3
| SecurityProtocolType.Tls
| (SecurityProtocolType)0x300 //Tls11
| (SecurityProtocolType)0xC00; //Tls12
标签:TLS,C#,ServicePointManager,SSL,SecurityProtocol,客户端,Tls11,SecurityProtocolType,T
From: https://www.cnblogs.com/nuomibaibai/p/16985416.html