基础连接已经关闭: 未能为 SSL/TLS 安全通道建立信任关系

 response = request.GetResponse(); 前加上这段:

ServicePointManager.ServerCertificateValidationCallback = (sender, certificate, chain, sslPolicyErrors) => true;


               

猜你喜欢

转载自www.cnblogs.com/z-hj/p/12767016.html