title: How to change the timeout on a .NET WebClient object
body: <p>I am trying to download a client's data to my local machine (programatically) and their webserver is very, very slow which is causing a timeout in my <code>WebClient</code> object.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>WebClient webClient = new WebClient();
  
  webClient.Encoding = Encoding.UTF8;
  webClient.DownloadFile(downloadUrl, downloadFile);
  </code></pre>
  
  <p>Is there a way to set an infinite timeout on this object? Or if not can anyone help me with an example on an alternate way to do this?</p>
  
  <p>The URL works fine in a browser - it just takes about 3 minutes to show.</p>