title: Server not responding for only long requests. Underlying connection was closed. ReadResponse() failed
body: <p>I have tried the following solutions:</p>
  
  <p>1) Increase timeout in client request.</p>
  
  <p>2) Increase server ExecutionTimeout in web.config HTTPRuntime tag.</p>
  
  <p>3) I have tried using both ASMX and WCF services. Even when the server page takes time (code behind), an error appears <code>"ReadResponse() failed: The server did not return a response for this request."</code>.</p>
  
  <p>4) Change the application pool timeouts from IIS.</p>
  
  <p>5) Change the IIS > My website > HTTP response header > Set common headers > Enable/Disable HTTP alive</p>
  
  <p>I am using following code to test server timeout issue:</p>
  
  <pre><code>    [WebMethod]
      public string LongRequest(int delaySeconds)
      {
          Thread.Sleep(delaySeconds*1000);
          return "Delayed for " + delaySeconds + " Seconds";
      }
  </code></pre>
  
  <p>We have different servers but this issue is appearing only on one server.</p>
  
  <p>Note! This issue only appears when a request takes more than 40 seconds. (this time is not specific as it increases decreases everytime)</p>