title: 401 web exception while downloading file
body: <p>I want to download a certain file from a website. For that, I tried using this</p>
  
  <pre><code>WebProxy p = new WebProxy("192.168.10.254:8080", true);
  p.Credentials = new NetworkCredential("username", "pwd");
  WebRequest.DefaultWebProxy = p;
  WebClient client = new WebClient();
  string downloadString = client.DownloadString("myDowloadUrl");
  </code></pre>
  
  <p>Each time, I get this web exception</p>
  
  <blockquote>
    <p>The remote server returned an error: (401) Unauthorized.</p>
  </blockquote>
  
  <p>Any clues?</p>