title: An exception occurred during a WebClient request
body: <p>When uploading a file to a server with the c# webclient class the following error occurs</p>
  
  <pre><code>An exception occurred during a WebClient request
  </code></pre>
  
  <p>Unfortunately the status of this exception is unkown. The program worked fine for many weeks but now as the files that we want to upload the exception appears more frequently (not always). </p>
  
  <p>Does someone has an idea what I can test to find out why this happens? Some methods of debugging perhaps? Perhaps any solutions?</p>
  
  <p>This is the upload code</p>
  
  <pre><code>WebClient web = new WebClient();
  if (user != null) {
       web.Credentials = new NetworkCredential(user, password);
  }
  
  byte[] responseArray = web.UploadFile(uri, file.FullName);
  </code></pre>