当前位置:   article > 正文

HttpClient 访问https地址抛异常:The SSL connection could not be established, see inner exception_httpclient the ssl connection could not be establi

httpclient the ssl connection could not be established, see inner exception.
  1. var handler = new HttpClientHandler();
  2. handler.ClientCertificateOptions = ClientCertificateOption.Manual;
  3. handler.ServerCertificateCustomValidationCallback =
  4.         (httpRequestMessage, cert, cetChain, policyErrors) =>
  5.          {
  6.             return true;
  7.          };
  8. var client = new HttpClient(handler);

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/IT小白/article/detail/448824
推荐阅读
相关标签
  

闽ICP备14008679号