C# webclient and proxy server

前端 未结 7 480
情书的邮戳
情书的邮戳 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条回答
  •  日久生厌
    2020-11-30 04:26

    All previous answers have some merit, but the actual answer only needs ONE line:

    wc.Proxy = new WebProxy("127.0.0.1", 8888);
    

    where wc is the WebClient object, and 8888 is the port number of the proxy server located on the same machine.

提交回复
热议问题