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,
 
Back
Top