I've created a Download Manager application and I'm having a problem
with some clients where for whatever reason, the remote connection is
forceably closed (whether on the client side or server side I'm not
sure).
What I want to do is catch the specific IOException that deals with
the that only. I know with the WebException there is a Status and
then a related WebExceptionStatus enum that lets me distinguish
between the different WebExceptions. Is there an equivallent for
IOException? If not, how do I determine how to distinguish, other
than parsing the Message property, which I really don't want to do
because it isn't very clean.
Here's an example of the error I'm getting:
Error: Unable to read data from the transport connection: An existing
connection was forcibly closed by the remote host.
Stack: at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset,
Int32 size)
Any help is appreciated.
Thanks!