I am sending an HTTPWebRequest to a third party with the code below. The answer may take from 2 to 22 seconds. A third party claims that as soon as they receive it, they immediately send a response and that none of their other partners reports any delays (but I'm not sure I believe them, they already lied).
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://www.example.com");
request.Timeout = 38000;
request.Method = "POST";
request.ContentType = "text/xml";
StreamWriter streamOut = new StreamWriter(request.GetRequestStream(), System.Text.Encoding.ASCII);
streamOut.Write(XMLToSend);
streamOut.Close();
HttpWebResponse resp = null;
resp = (HttpWebResponse)request.GetResponse();
StreamReader responseReader = new StreamReader(resp.GetResponseStream(), Encoding.UTF8);
Response = responseReader.ReadToEnd();
Is there any reason that the above code just ... stopped? The code works in a very reliable hosting provider (Rackspace Intensive Segment), and the machine on which it works is not used for anything else. I am just testing the code that we are going to put into production. So it’s not that the car is taxed, and given that it’s Rackspace and we pay the boat, I doubt it’s their network.
, , , 20 000 .