Update on my previous problem, I found out in my console that I have the
following exception. Hmm seems it is related with something that can't
access a disposed object.
Unhandled Exception: System.IO.IOException: Unable to read data from the
transport connection. ---> System.ObjectDisposedException: Cannot access a
disposed object.
at System.Threading.ManualResetEvent.Reset()
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
--- End of inner exception stack trace ---
at System.Net.Connection.ReadCallback(IAsyncResult asyncResult)
at System.Net.LazyAsyncResult.InvokeCallback()
at System.Net.LazyAsyncResult.InvokeCallback(Boolean
completedSynchronously,Object result)
at System.Net.Sockets.OverlappedAsyncResult.Completio nPortCallback(UInt32
errorCode, UInt32 numBytes, NativeOverlapped* nativeOverlapped)
Any help will be much appreciated.
thanks,
/m
Hello,
Every now and then my application throw this exception:
"Unable to read data from the transport connection"
And when I break into the Visual Studio, the thread where it failed has
none of my code and the following is the call stack:
system.dll!System.Net.Connection.ReadCallback(Syst em.IAsyncResult
asyncResult = {System.Net.Sockets.OverlappedAsyncResult}) + 0x37d bytes
system.dll!System.Net.LazyAsyncResult.InvokeCallba ck() + 0x27 bytes
system.dll!System.Net.LazyAsyncResult.InvokeCallba ck(bool
completedSynchronously = false, System.Object result = {0}) + 0x23 bytes
system.dll!System.Net.Sockets.OverlappedAsyncResul t.CompletionPortCallback(u int errorCode = 10038, uint numBytes = 0,
System.Threading.NativeOverlapped* nativeOverlapped = 220220032) + 0xf2 bytes
Question is how do I know *where* exactly in my code that cause this
exception? I really don't know what trigger this (apart from from probably
in the Net connection, I do open a number of them and tried to close all
properly). I put all the Net connection in try catch block but none really
shows any problem.
Help, I'm stumped on this one.
thanks,
/m