如何在Win8 App中使用代理连接HTTPS

时间:2013-07-12 07:16:56

标签: http https proxy microsoft-metro

我可以通过http连接,但无法连接https。

HttpRequestException消息:

  

发送请求时发生错误。   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);

0 个答案:

没有答案