System.net.sockets.socket object disposed exception

P

Peter Huish

I have a VS2003 VB.Net that is using sockets to exchange information
with a server application. Intermittently the application is receiving
a System.net.sockets.socket object disposed exception that is not being
trapped.

My code looks like:

try
sck.Connect(...)

sck. Send

sck.receive

Catch ex as Exception
Some logging
end try

try
sck.Shutdown(...)

sck.close

Catch ex as Exception
Some logging
end try

The error is very intermittent but is not trapped by the code above. Am
I wrong in expecting that the Exception would be trapped using the
Exception object? Should I be using sockect specific exception types.

The application is also doing some database access to the server using
rda. Could the System.net.sockets.socket object disposed exception be
thrown and trapped there?


thanks

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