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

转载于:https://www.cnblogs.com/LuoEast/p/10256637.html

你可能感兴趣的:(C# HttpWebResponse WebClient 基础连接已经关闭: 发送时发生错误.)