首页 > 其他分享 >.net core WebRequest请求报错The SSL connection could not be established

.net core WebRequest请求报错The SSL connection could not be established

时间:2023-01-06 14:23:29浏览次数:64  
标签:core established request HttpWebResponse WebRequest 报错 net

解决方案,添加证书忽略

1 HttpWebRequest request = (HttpWebRequest)WebRequest.Create(url);
2 request.ServerCertificateValidationCallback = (_s, _x509s, _x509c, _ssl) => { return (true); };
3 HttpWebResponse response = (HttpWebResponse)request.GetResponse();

 

标签:core,established,request,HttpWebResponse,WebRequest,报错,net
From: https://www.cnblogs.com/real9527/p/17030336.html

相关文章