1

I can connect by http but can not connect https.

HttpRequestException Message:

An error occurred while sending the request. System.Net.WebExceptionStatus.TrustFailure

HttpClientHandler clienthandler = new HttpClientHandler();
        HttpClient client = new HttpClient(clienthandler);
        HttpRequestMessage req = new HttpRequestMessage(HttpMethod.Post, "https://www.google.com.hk/");
        req.Headers.Referrer = new Uri("https://www.google.com.hk/");
        HttpResponseMessage mes = await client.SendAsync(req);
cremor
  • 6,669
  • 1
  • 29
  • 72
wudijimao
  • 53
  • 6

0 Answers0