title: Does WebClient.DownloadFileTaskAsync() never actually timeout?
body: <p>In the pre-async days, people wanted to know how to set the timeout on <code>WebClient</code> and the answer was simply to extend the base class and override <code>GetWebRequest()</code> and set the timeout there.</p>
  
  <pre><code>protected override WebRequest GetWebRequest(Uri address)
  {
      // NOTE: this override has no affect if the Async methods are used!!!
      WebRequest request = base.GetWebRequest(address);
      ((HttpWebRequest)request).Timeout = 20 * 60 * 1000;
      ((HttpWebRequest)request).ReadWriteTimeout = 20 * 60 * 1000;
      return request;
  }
  </code></pre>
  
  <p>The assumption was that people needed a <em>longer</em> timeouts.</p>
  
  <p>Then with the addition of the <code>xyzTaskAsync()</code> methods, people wanted to know how to set the timeout, and the answer was to use a CancellationToken driven by a local timer.</p>
  
  <p>So I guess the assumption was that people needed the request to end after a given time.</p>
  
  <p>So <strong>does this mean that</strong> <code>DownloadFileTaskAsync()</code> or <code>DownloadStringTaskAsync()</code> <strong>never timeout by themselves</strong>? Isn't a timeout failure an inherent part of any network operation?</p>
  
  <p>I've used the <code>GetWebRequest()</code> override to set a very small timeout value. It throws the timeout exception when non-async methods are called, but not when the async methods are called.</p>
  
  <p>I've decompiled the System.Net library, but the async methods seem to invoke some cached anonymous lambdas that are not easily discoverable.</p>
  
  <p>Does anyone know with certainty if the <code>DownloadXyzTaskAsync()</code> methods execute with the equivalent of an infinite timeout value?</p>