title: HttpWebRequest: Unable to connect to the remote server
body: <p>I develop client app which connects to the server and fetches different information from it. It is multithreaded app. When I start it with a few threads it works perfect. 
  Until it start throwing an exception with the following message: </p>
  
  <p>"Unable to connect to the remote server"</p>
  
  <p>I've used TCPView and cannot find anything about my client app. So when it starts returning "Unable to Connect" it doesn't even OPEN any http connections...</p>
  
  <p>How can I figure out why it doesn't open connection?</p>
  
  <p>Thanks,</p>
  
  <p><strong>EDIT:</strong></p>
  
  <p>Here is the code I'm using in Multiple threads to fecth page content:</p>
  
  <pre><code>    HttpWebResponse response = null;
          Stream resStream = null;
          StreamReader reader = null;
          string res = "";            
          try
          {
              HttpWebRequest request = (HttpWebRequest)
                  WebRequest.Create(requestUrl);
              if (cookies_ == null)
              {
                  cookies_ = new CookieContainer();
              }
              request.Timeout = timeoutVal_;
              request.ReadWriteTimeout = timeoutVal_ * 2;
              request.KeepAlive = false;
  
              if (bUseCookies)
              {
                  request.CookieContainer = cookies_;
              }
  
              // execute the request
              response = (HttpWebResponse)
                  request.GetResponse();
  
              resStream = response.GetResponseStream();
              reader = new StreamReader(resStream);
              res = reader.ReadToEnd();
          }
          catch (Exception ex)
          {
              throw new Exception(siteToken + " " + ex.Message);
          }
          finally
          {
              if (response != null)
                  response.Close();
  
              if (resStream != null)
                  resStream.Close();
  
              if (reader != null)
              {
                  reader.Close();
              }
          }
  
          return res;
  </code></pre>
  
  <p>After a couple minutes threads getting into cycle with Timeout Exception or Unable to connect to Server.</p>
  
  <p>The strange thing that if I start Fiddler, connections get reactivated and threads continue working for some time. How does Fiddler fix that problem?</p>