title: Verify file exists on website
body: <p>I am attempting to make a simple function that verifies that a specific file exists on a website.</p>
  
  <p>The web request is set to head so I can get the file length instead of downloading the entire file, but I get "Unable to connect to the remote server" exception.
  How can I verify a file exists on a website?</p>
  
  <pre><code>    WebRequest w;
  
      WebResponse r;
  
      w = WebRequest.Create("http://website.com/stuff/images/9-18-2011-3-42-16-PM.gif");
      w.Method = "HEAD";
      r = w.GetResponse();
  </code></pre>
  
  <p>edit: My bad, turns out my firewall was blocking http requests after I checked the log.
  It didnt prompt me for an exception rule so I assumed it was a bug.</p>