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
It appears that WebRequest.DefaultWebProxy is the official replacement for WebProxy.GetDefaultProxy.
You should be able to drop that in to your original code with only a little modification. Something like:
WebProxy proxy = (WebProxy) WebRequest.DefaultWebProxy;
if (proxy.Address.AbsoluteUri != string.Empty)
{
Console.WriteLine("Proxy URL: " + proxy.Address.AbsoluteUri);
wc.Proxy = proxy;
}