Hi
I have a .NET 1.1 app that is using a WebRequest/GetResponse to call a php script on a web server. The first 2 times the process is run it completes fine. On the 3rd attempt I get a timeout error "The operation has timed out".
I have tried this on 2 different PCs and making the call to 2 different web servers (one windows and one linux).
Here's the code:
Changing the timeout to a longer term does not help
Any ideas? Why would it timeout on the 3rd attempt and not the others?
Thanks Rob
I have a .NET 1.1 app that is using a WebRequest/GetResponse to call a php script on a web server. The first 2 times the process is run it completes fine. On the 3rd attempt I get a timeout error "The operation has timed out".
I have tried this on 2 different PCs and making the call to 2 different web servers (one windows and one linux).
Here's the code:
Code:
WebRequest wrq = WebRequest.Create(String.Concat(BACK_UP_LOCATION, "backup.php", sQ));
wrq.Timeout = 10000;
WebResponse wrs = wrq.GetResponse(); // Errors here...
StreamReader sr = new StreamReader(wrs.GetResponseStream(), Encoding.ASCII);
s.Append(sr.ReadToEnd());
wrs.Close();
wrs = null;
wrq = null;
Changing the timeout to a longer term does not help
Any ideas? Why would it timeout on the 3rd attempt and not the others?
Thanks Rob