Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>How are you creating Request object??</p> <pre><code>HttpWebRequest request = (HttpWebRequest)WebRequest.Create(args[0]); request.CookieContainer = new CookieContainer(); HttpWebResponse response = (HttpWebResponse) request.GetResponse(); </code></pre> <p><a href="http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.cookiecontainer.aspx" rel="nofollow noreferrer">CookieContainer</a></p> <blockquote> <p>Try to set <a href="http://msdn.microsoft.com/en-us/library/system.net.webrequest.timeout.aspx" rel="nofollow noreferrer">myWebRequest.Timeout</a> =xxx</p> </blockquote> <ul> <li>If you are running multiple concurrent requests try setting connections limit</li> </ul> <blockquote> <p><a href="http://msdn.microsoft.com/en-us/library/system.net.servicepointmanager.defaultconnectionlimit.aspx" rel="nofollow noreferrer">System.Net.ServicePointManager.DefaultConnectionLimit</a><br> <a href="http://msdn.microsoft.com/en-us/library/system.net.servicepoint.connectionlimit.aspx" rel="nofollow noreferrer">ServicePoint.ConnectionLimit</a></p> </blockquote> <p>Check these links for more information:</p> <p><a href="https://stackoverflow.com/questions/6139498/httpwebrequest-operation-has-timed-out">HttpWebRequest &quot;operation has timed out&quot;</a><br> <a href="https://stackoverflow.com/questions/387247/i-need-help-setting-net-httpwebrequest-timeout">I need help setting .NET HttpWebRequest timeout</a><br> <a href="https://stackoverflow.com/questions/1500955/adjusting-httpwebrequest-connection-timeout-in-c-sharp">Adjusting HttpWebRequest Connection Timeout in C#</a></p> <p>here are many reasons why GetResponse() might hang. Some are: </p> <p>1) You have reached the connection limit on the client ( 2 conns per http/1.1 server, 4 connections per http/1.0 server, or custom limit set on the ServicePoint), and no connection is free to send a request to the server. In other words, you might have 2 requests outstanding (eg: to a 1.1 server) which are taking more than 2 minutes to complete, and then issue another GetResponse() to the same server. The last getresponse() might time out.</p> <p>2) You have not closed the response stream of an earlier httpwebresponse. So, even if a connection is free, the request wont be sent.</p> <p>3) The server is taking too long to send the response.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload