c#未能创建 SSL/TLS 安全通道

https请求时报错:未能创建 SSL/TLS 安全通道

 

解决方法:

 

Framework 4.0以上的版本 添加

System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

 

Framework 4.0的版本  添加

ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;

posted on 2021-08-26 15:21  木色小罗  阅读(631)  评论(0编辑  收藏  举报

导航

诗与远方