Problem of throwing exception (System.Net.Sockets.OverlappedAsyncResult::CompletionPortCallback)

V

VincentWong

hi all,

We're getting a security exception (An unhandled exception of type
'System.Security.SecurityException' occurred in mscorlib.dll) on a
asychronous
callback(System.Net.Sockets.OverlappedAsyncResult::CompletionPortCallback).T
his exception occurs when our control is embedded within an IE web page. A
connection is established after calling a web service, it keeps opened for a
period of time(observd by using netstat), it seems that when the connection
is closed(timed out), the exception is thrown. When the web service is
called again, no new connection is established(observed by using netstat),
then an exception, "The operation has timed-out", is thrown. It seems that
it tries to use the closed connection and it only happens when the control
is embedded in the IE.

Anybody have an idea solving this problem?

Thanks

Vincent
 
V

VincentWong

Hi all,

The problem is solved by setting the KeepAlive property of the
WebRequest
to False which force a new connection to be created for each call.

Thanks

Vincent
 

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,906
Latest member
SkinfixSkintag

Latest Threads

Top