HOWTO: Using IE proxy settings (including credentials!)

Very easy but hard to find.

 System.Web.Services.Protocols.SoapHttpClientProtocol proxy = ...
System.Net.WebProxy ieProxy = System.Net.WebProxy.GetDefaultProxy();
if (ieProxy != null && ieProxy.Address != null)
{
   ieProxy.Credentials = System.Net.CredentialCache.DefaultCredentials;
   proxy.Proxy = ieProxy;
}
proxy.PreAuthenticate = true;