在发送HTTP请求前加入下行代码
ServicePointManager.SecurityProtocol = (SecurityProtocolType) | (SecurityProtocolType) | (SecurityProtocolType);
如果是4.5以上版本可以直接使用
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11;
2022-05-27 13:15:36
在发送HTTP请求前加入下行代码
ServicePointManager.SecurityProtocol = (SecurityProtocolType) | (SecurityProtocolType) | (SecurityProtocolType);
如果是4.5以上版本可以直接使用
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11;