I am trying to invoke a webpage using HttpWebRequest, however I get "operation has timed out error".
string sURL = "http://localhost:53667/MyPage.aspx"; WebRequest wrGETURL = WebRequest.Create(sURL); wrGETURL.Timeout = 5000; System.Net.ServicePointManager.DefaultConnectionLimit = 5000; var r = wrGETURL.GetResponse(); r.Close(); wrGETURL.Abort();
As you can see, I added the DefaultConnectionLimit property, closed the response, as other threads suggested, but this did not seem to do this. What am I doing wrong?
Edit:
When I use the full example: http://support.microsoft.com/kb/307023 , starting / debugging it from Visual C # as a console application, it does not time out. When I install this program to run in the Windows Task Scheduler, it makes a timeout.
Rivka source share