Answer the question
In order to leave comments, you need to log in
Why does C# ignore proxy settings through HttpWebRequest?
The bottom line is in the code below, judging by Google, it is correct and the request should be called using the specified proxy server, but the application flatly refuses to use the proxy and just downloads directly. If anyone has come across this, what is wrong with this code?
<code lang="cs">
HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
WebProxy proxyObject = new WebProxy("127.0.0.1:8080");
req.Proxy = proxyObject;
</code>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question