解决方案,添加证书忽略
1 2 3 |
HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url); request.ServerCertificateValidationCallback = (_s, _x509s, _x509c, _ssl) => { return (true); }; HttpWebResponse response = (HttpWebResponse)request.GetResponse(); |
from:https://www.cnblogs.com/real9527/p/17030336.html