M
Mark
I create a HttpWebRequest as follows:
m_req = (HttpWebRequest) WebRequest.Create(url);
m_req.Timeout = 1000*1000;
m_req.Method = "POST";
// issue request
I issue my request and receive the HTTP headers. However as the
request is a long running dynamic request for computed data the body
will not be sent for some time. What happens to me is that the request
times out on the Read way before my 1000secs is up! I can see no other
timeout to set to prevent this happening - is there any other
workaround?
HttpWebResponse res = (HttpWebResponse) m_req.GetResponse();
// I can see res.Headers
// Read on res.GetResponseStream() times out
The reason that the server sends the HTTP headers before the body is
because the requests are dynamic it can NOT predict the size of the
response document and therefore just produces it as it process the
request (e.g. a large database query of indeterminate response size).
Many thanks in advance for any useful answers!
m_req = (HttpWebRequest) WebRequest.Create(url);
m_req.Timeout = 1000*1000;
m_req.Method = "POST";
// issue request
I issue my request and receive the HTTP headers. However as the
request is a long running dynamic request for computed data the body
will not be sent for some time. What happens to me is that the request
times out on the Read way before my 1000secs is up! I can see no other
timeout to set to prevent this happening - is there any other
workaround?
HttpWebResponse res = (HttpWebResponse) m_req.GetResponse();
// I can see res.Headers
// Read on res.GetResponseStream() times out
The reason that the server sends the HTTP headers before the body is
because the requests are dynamic it can NOT predict the size of the
response document and therefore just produces it as it process the
request (e.g. a large database query of indeterminate response size).
Many thanks in advance for any useful answers!