I have a VM that runs a few web crawling console applications. I’m wondering how do you use a different proxy per console application. Most of the proxy C# stuff I find changes the registry, however this changes all console apps not just one.
Anybody have an example of how to use a specific proxy for a specific console app without effective all other console apps?
Looking for a source code solution
Assuming your console application’s use one of the built-in methods for downloading web pages (WebClient, HttpWebRequest, etc.), they all have a Proxy Property which should do what you’re after. They pretty much all work the same so here’s the example provided by the MSDN documentation for HttpWebRequest.Proxy: