title: How should I set the default proxy to use default credentials?
body: <p>The following code works for me:</p>
  
  <pre><code>var webProxy = WebProxy.GetDefaultProxy();
  webProxy.UseDefaultCredentials = true;
  WebRequest.DefaultWebProxy = webProxy;
  </code></pre>
  
  <p>Unfortunately, <code>WebProxy.GetDefaultProxy()</code> is deprecated.  What else should I be doing?</p>
  
  <p>(using app.config to set the defaultProxy settings is not allowed in my deployment)</p>