title: HttpWebRequest not returning, connection closing
body: <p>I have a web application that is polling a web service on another server. The server is located on the same network, and is referenced by an internal IP, running on port 8080. </p>
  
  <p>Every 15 secs, a request is sent out, which receives an xml response with job information.  95% of the time, this works well, however at random times, the request to the server is null, and reports a "response forcibly closed by remote host."</p>
  
  <p>Researching this issue, others have set KeepAlive = false. This has not solved the issue. The web server is running .NET 3.5 SP1. </p>
  
  <pre><code>Uri serverPath = new Uri(_Url);
  
  // create the request and set the login credentials
  _Req = (HttpWebRequest)WebRequest.Create(serverPath);
  _Req.KeepAlive = false;
  _Req.Credentials = new NetworkCredential(username, password);
  _Req.Method = this._Method;
  </code></pre>
  
  <p>Call to the response:</p>
  
  <pre><code>HttpWebResponse response = (HttpWebResponse)request.GetResponse();
  _ResponseStream = response.GetResponseStream();
  </code></pre>
  
  <p>The method for this is GET. I tried changing the timeout, but the default is large enough to take this into account.</p>
  
  <p>The other request we perform is a POST to post data to the server, and we are getting the same issue randomly as well. There are no firewalls affecting this, and we ruled out the Virus scanner. Any ideas to help solving this is greatly appreciated!</p>