Webresponse ?

  • Thread starter Thread starter Lloyd Dupont
  • Start date Start date
L

Lloyd Dupont

I have a code doing lots of HTPP query.
Many of them returning a 404 error.
On the desktop it runs fine.

On the PPC it seems that instead of returning a 404 error straight away it
hangs around quite a while before returning 404.


I have a code like

WebRequest wr = WebRequest.Create(http://aserver);
wr.Method = "POST";
wr.ContentType = "application/x-www-form-urlencoded";
Stream s = wr.GetRequestStream();
s.Write(missingURIbuf, 0, missingURIbuf);
s.Close();
WebResponse wresp = wr.GetResponse(); // <--- habging before 404
 
Do not forget to call wresp.Close() method to close the connection. Otherwise you will run out of free connections
HINT
ServicePoint.ConnectionLimit
 
Back
Top