title: How to use IE proxy server settings and its credentials in .Net Application
body: <p>How to use the saved proxy settings and credentials as default for HttpWebRequests? The proxy settings are accessible and used but not the credentials:</p>
  
  <pre><code>IWebProxy proxy = WebRequest.GetSystemWebProxy();
  proxy.Credentials = CredentialCache.DefaultNetworkCredentials;
  WebRequest.DefaultWebProxy = proxy;
  </code></pre>
  
  <p>Are there any permissions on using the credentials?</p>
  
  <p>It works with passing the credentials via NetworkCredential instance:</p>
  
  <pre><code>proxy.Credentials = new NetworkCredential("username", "password");
  </code></pre>
  
  <p>But I would like to use the saved ones from the operating system/IE.</p>
  
  <p><strong>Edit:</strong></p>
  
  <p>I am using a third party lib creating and calling the HttpWebRequests which should be passed through the proxy. Could that be part of the problem?</p>
  
  <p>Using the App.Config file with this content doesn't work either</p>
  
  <pre><code>&lt;configuration&gt;
    &lt;system.net&gt;
      &lt;defaultProxy enabled="true" useDefaultCredentials="true"&gt;
      &lt;/defaultProxy&gt;
    &lt;/system.net&gt;
  &lt;/configuration&gt;
  </code></pre>