Monday, April 6, 2009

Resolved the timed out error while using HttpWebRequest



Below error message was thrown when I tried to use HttpWebRequest object for getting response code from webpage.
system.net.webexception the operation has timed out

After doing google search I came to know that we can't use more than one connection for getting response from pages of same server.

So closing the connection using "Close()" after getting the response has resolved this issue.

And also, I came to know that just for finding whether a page exists, we need not get the all the response string. Using HttpWebRequest.method="HEAD" will get only the header part. This will improve the execution speed.
More Articles...

No comments:



Thanks for visiting our blog


twitterrss facebook linkedin YouTube subscribe


Subscribe via email

Enter your email address: