Requesting html over https with c# Webclient

后端 未结 4 775
忘掉有多难
忘掉有多难 2020-11-29 07:23

I am attempting various html resources via c# WebClient class from a site I have no control over. When I attempt to access urls such as \"https://archive.org/details/OTRR_

4条回答
  •  忘掉有多难
    2020-11-29 08:27

    Just add this line before var stream = webClient.OpenRead(address);

    System.Net.ServicePointManager.ServerCertificateValidationCallback += (send, certificate, chain, sslPolicyErrors) => { return true; };
    

    That should sort out the SSL/TLS error

提交回复
热议问题