IISCrypto IIS Crypto(服务器安全管理工具 TLS 设置 c#

 

 

 

 

 

c#,asp.net 4.0-4.4  

在发送HTTP请求前加入下行代码

ServicePointManager.SecurityProtocol = (SecurityProtocolType)192 | (SecurityProtocolType)768 | (SecurityProtocolType)3072;
 
  4.5  

如果是4.5以上版本可以直接使用

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11;
posted @ 2020-06-16 08:22  2eggs  Views(1245)  Comments(3Edit  收藏  举报