title: C# HTTP web request keeps timing out
body: <p>I am making a Http Webrequest to an available site that I can visit fine, but the HTTP Web request keeps timing out. Is there any reason why this code might allow it to timeout when it shouldn't?</p>
  
  <p>I've tried upping the timeout setting, but it still continues to timeout.</p>
  
  <pre><code>    Uri CameraUrl = new Uri("http://" + cfg_cameraIps[i]);
      HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create(CameraUrl);
      myRequest.Timeout = 5000;
  
      myRequest.Method = "HEAD";
  
      try
      {
          HttpWebResponse webresponse;
          webresponse = (HttpWebResponse)myRequest.GetResponse();
  
          if (webresponse.StatusCode.ToString() == "OK")
          {
              continue;
          }
  </code></pre>