Networking Disconnect Error

D

DanielGifford

Hi, I'm writing a tcp connection program. Whenever the client
disconnects from the server, I get this error:

////////begin error

An unhandled exception of type 'System.Net.Sockets.SocketException'
occurred in System.dll

Additional information: An existing connection was forcibly closed by
the remote host

////////end error

Any ideas on how to go about solving this?

Thanks
 
N

Nicholas Paldino [.NET/C# MVP]

Are you getting this exception on the client or on the server?
 
D

DanielGifford

Are you getting this exception on the client or on the server?

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


Hi, I'm writing a tcp connection program. Whenever the client
disconnects from the server, I get this error:
////////begin error
An unhandled exception of type 'System.Net.Sockets.SocketException'
occurred in System.dll
Additional information: An existing connection was forcibly closed by
the remote host
////////end error
Any ideas on how to go about solving this?

both
 
D

DanielGifford

Are you getting this exception on the client or on the server?

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


Hi, I'm writing a tcp connection program. Whenever the client
disconnects from the server, I get this error:
////////begin error
An unhandled exception of type 'System.Net.Sockets.SocketException'
occurred in System.dll
Additional information: An existing connection was forcibly closed by
the remote host
////////end error
Any ideas on how to go about solving this?

I should add that this error only occurs when the connection is killed
forcefully (pulling the plug on either the server or the client.)
 
P

Peter Duniho

[...]
I should add that this error only occurs when the connection is killed
forcefully (pulling the plug on either the server or the client.)

HELP?

If you are going to use the newsgroups as a help resource, you need to
have more patience than two hours worth.

As far as your error goes, sounds normal to me. You need to put exception
handling code around calls to the Socket API, as there are a number of
perfectly normal exceptional cases that can occur.

Pete
 

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