HttpWebRequest ReadToEnd and Timeout Problems...

  • Thread starter Thread starter Kevin Z Grey
  • Start date Start date
K

Kevin Z Grey

Heya,

I've found while using HttpWebRequest that when the
TCP and/or ActiveSync connection is interrupted (read:
remove device from cradle or internet connection drops)
the ReadToEnd operation hangs and the Timeout property on
the HttpWebRequest does not appear to cause a timeout as
one would expect. Do I need to create my own Timer to
Abort the HttpWebRequest in case this occurs? Is there a
better way to handle this?

~~K
 
Kevin Z Grey said:
Heya,

I've found while using HttpWebRequest that when the
TCP and/or ActiveSync connection is interrupted (read:
remove device from cradle or internet connection drops)
the ReadToEnd operation hangs and the Timeout property on
the HttpWebRequest does not appear to cause a timeout as
one would expect. Do I need to create my own Timer to
Abort the HttpWebRequest in case this occurs? Is there a
better way to handle this?

Assuming you provide your own timeout solution, asynchronous I/O with
WebRequest/WebResponse works around this problem.

Cheers,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top