I want to set a proxy in C#.NET, the thing is, how would I make it so that all web requests and web browser controls connect through the proxy? Like a SOCKS proxy?
I need it to apply to any web browser controls or any web requests. It would be best if I could just set it so all outgoing requests from the user’s machine is sent through the proxy.
By default, your C# code will use the system proxy set in your IE connection settings.
If you want to be explicit, you can do it via config under System.net:
Programmatically, you can set the proxy:
http://msdn.microsoft.com/en-us/library/system.net.webproxy.aspx
EDIT:
For web browser control, try this SO post: (disclaimer – haven’t tried that)
How to set a proxy for Webbrowser Control without effecting the SYSTEM/IE proxy