C# 2008 SP1
I am using the code to detect if a proxy has been set under \"Internet Options\". If there is a proxy then I will set this in my webclient.
So I
WebClient
etc use the WinHTTP settings (not the IE settings), so the easiest thing to do is to configure WinHTTP! On XP etc you can use:
proxycfg -u
to import the current IE settings into the WinHTTP store. After that, WebClient
etc should be able to use the same settings without issue. On Vista and Windows 7 this is now found under:
netsh winhttp import proxy ie
You need to run this as administrator.