C# webclient and proxy server

前端 未结 7 485
情书的邮戳
情书的邮戳 2020-11-30 04:10

I am using a web client class in my source code for downloading a string using http.

This was working fine. However, the clients in the company are all connected now

7条回答
  •  旧时难觅i
    2020-11-30 04:19

    My solution:

    WebClient client = new WebClient();
    WebProxy wp = new WebProxy(" proxy server url here");
    client.Proxy = wp;
    string str = client.DownloadString("http://www.google.com");
    

提交回复
热议问题