在HttpWebRequest前设置代码
ServicePointManager.Expect100Continue = true;
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12 | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls;
ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, errors) => true;
标签:TLS,ServicePointManager,SSL,HttpWebRequest,true,SecurityProtocolType
From: https://www.cnblogs.com/wkk2020/p/16798803.html