Weird Socket issues

I

Ian Frawley

Hi all

I am running a standard client server socket type thing and I have started
getting this exception

Exception: System.IO.IOException
Message: Unable to read data from the transport connection.
Source: System
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset,
Int32 size)
at System.IO.StreamReader.ReadBuffer()
at System.IO.StreamReader.ReadLine()
at Opal.Requester.Locations.SocketLocation.ReadMessages(StreamReader sr)
at Opal.Requester.Locations.SocketLocation.ClientConnected(Object
tcpClient)

Nested Exception

Exception: System.Net.Sockets.SocketException
Message: An existing connection was forcibly closed by the remote host
Source: System
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32
size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset,
Int32 size)

Anyone know what cause this? I am confused.

Ian
--
"Life should NOT be a journey to the grave
with the intention of arriving safely in an
attractive and well preserved body,
but rather to skid in sideways,
chocolate in one hand, beer in the other,
body thoroughly used up,
totally worn out and screaming
WOO HOO what a ride!"
 
N

Nicholas Paldino [.NET/C# MVP]

Ian,

Is it possible that the server you are connecting to is dropping the
connection? It would seem that is the case, from the message in the inner
exception.

Hope this helps.
 
I

Ian Frawley

in message

Yes it seems that, that was the case.

Thanks

Ian
Ian,

Is it possible that the server you are connecting to is dropping the
connection? It would seem that is the case, from the message in the inner
exception.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Ian Frawley said:
Hi all

I am running a standard client server socket type thing and I have started
getting this exception

Exception: System.IO.IOException
Message: Unable to read data from the transport connection.
Source: System
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset,
Int32 size)
at System.IO.StreamReader.ReadBuffer()
at System.IO.StreamReader.ReadLine()
at Opal.Requester.Locations.SocketLocation.ReadMessages(StreamReader sr)
at Opal.Requester.Locations.SocketLocation.ClientConnected(Object
tcpClient)

Nested Exception

Exception: System.Net.Sockets.SocketException
Message: An existing connection was forcibly closed by the remote host
Source: System
at System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32
size, SocketFlags socketFlags)
at System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset,
Int32 size)

Anyone know what cause this? I am confused.

Ian
--
"Life should NOT be a journey to the grave
with the intention of arriving safely in an
attractive and well preserved body,
but rather to skid in sideways,
chocolate in one hand, beer in the other,
body thoroughly used up,
totally worn out and screaming
WOO HOO what a ride!"
 

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

Top