C# HttpWebResponse WebClient 基础连接已经关闭: 发送时发生错误.

https://blog.csdn.net/sun49842566/article/details/82802297

 

    net 4.0 设置: ServicePointManager.SecurityProtocol = (SecurityProtocolType)3072;
    //.net 4.5 设置: ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls1.2;
     

 

附上官方说明

https://docs.microsoft.com/zh-cn/dotnet/api/system.net.securityprotocoltype?view=netframework-4.7.2

posted @ 2019-01-11 18:18  LuoCore  阅读(2098)  评论(0编辑  收藏  举报