I had to design an application to ping a website periodically.
So i used httprequest response model.
Now the request is sent to site and i get response when i run the application. But i get response only twice and third time when site is requested an exception is thrown.It is a timeout exception.I tries setting the timeout value manually but it doesn't
help.
Member
2 Points
9 Posts
Timeout exception for HttpResponse
Feb 15, 2012 07:48 AM|dipika.47|LINK
Hi,
I had to design an application to ping a website periodically.
So i used httprequest response model.
Now the request is sent to site and i get response when i run the application. But i get response only twice and third time when site is requested an exception is thrown.It is a timeout exception.I tries setting the timeout value manually but it doesn't help.
Dunno if am missing anything.
Any help is appreciated.
Thanks,
Dpkas
Participant
1254 Points
495 Posts
Re: Timeout exception for HttpResponse
Feb 15, 2012 07:56 AM|Muhammad Fakhr Elden Sami|LINK
Make sure that myHttpWebRequest .Timeout is set to enough value (it is in milli seconds)
myHttpWebRequest = (HttpWebRequest) HttpWebRequest.Create(inURL);
If you feel it helps, Mark as answered so that it can help others to find solution.
For Any further questions, please contact me.
Contributor
5745 Points
1899 Posts
Re: Timeout exception for HttpResponse
Feb 15, 2012 07:57 AM|vinay13mar|LINK
wht the code u have written?
V.K.Singh
Member
2 Points
9 Posts
Re: Timeout exception for HttpResponse
Feb 16, 2012 04:10 AM|dipika.47|LINK
I got solution..:):):)
The below links help:
http://stackoverflow.com/questions/5827030/httpwebrequest-times-out-on-second-call
http://blogs.msdn.com/b/adarshk/archive/2005/01/02/345411.aspx
Thanks,
Dipika