title: Weird WebClient behavior: 1 computer hangs, others don't for same file
body: <p>I've got a simple C# system tray app which uses <code>System.Net.WebClient</code> to download several files, each in the range of 3-15MB.  The WebClient is downloading via HTTPS, and I control the servers from which the downloads are taking place.  The files download just fine from a web browser via direct path, and the WebClient is perfectly able to process <code>.DownloadString()</code> methods (i.e., download short text files to string) from this server.</p>
  
  <p>Weirdly, three things have happened in 24 hours, and I'm suspecting some kind of machine-specific config or caching, but I wonder what others might know about <code>WebClient</code>'s innards which might permit them to hazard a guess:</p>
  
  <ol>
  <li>Development machine #1 had no trouble running this code in Debug mode and downloading the files (call them MegabyteFile1 and MegabyteFile2) until Friday.  Downloads took 3-5 seconds, maximum.</li>
  <li>Suddenly, Development machine #1 stopped downloading MegabyteFile1 on Friday afternoon.  Behavior is as follows:
  <ul>
  <li><code>WebClient.DownloadFile()</code> hangs indefinitely</li>
  <li>The file at <code>targetFileFullPath</code> is created but has 0 bytes.</li>
  <li>Main thread blocks indefinitely.</li>
  <li>Must exit application.</li>
  </ul></li>
  <li>Other development machines with identical OS configurations run the code just fine and download successfully.</li>
  <li>Manually downloading these files using Chrome or Internet Explorer on DevelopmentMachine1 works just fine, with and without the query parameters.</li>
  <li>DevelopmentMachine1 <em>will</em> download the file if Fiddler is running (even without having the Fiddler HTTPS certificate impostors installed).  In other words, if I try to sniff the wire on this machine, everything works fine.</li>
  </ol>
  
  <p>The pertinent section of the download code reads as follows:</p>
  
  <pre><code>using (WebClient client2 = new WebClient())
  {
    client2.DownloadFile(String.Format("{0}?{1}", thePath, queryParams), targetFileFullPath);
  }
  </code></pre>
  
  <p>I've tried the usual sysadmin stuff on this box:  rebooted it, cleared the Internet Explorer cache and temp directories, etc.</p>
  
  <p>I know I need to change my strategy for dealing with hung downloads, as I'm sure there will be downloads that hang in the real world.  But I'm not confident I'll think of all the corner cases if I don't understand what is causing this particular failure mode.  Anyone know enough about what's going on in <code>WebClient</code> to hazard a guess as to why this machine is "special"?</p>
  
  <p>Thanks!
  -James</p>