"Unable to read data from the transport connection" exception

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Muscha

    "Unable to read data from the transport connection" exception

    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!Syst em.Net.Connecti on.ReadCallback (System.IAsyncR esult
    asyncResult = {System.Net.Soc kets.Overlapped AsyncResult}) + 0x37d bytes



    system.dll!Syst em.Net.LazyAsyn cResult.InvokeC allback() + 0x27 bytes



    system.dll!Syst em.Net.LazyAsyn cResult.InvokeC allback(bool
    completedSynchr onously = false, System.Object result = {0}) + 0x23 bytes



    system.dll!Syst em.Net.Sockets. OverlappedAsync Result.Completi onPortCallback( u
    int errorCode = 10038, uint numBytes = 0, System.Threadin g.NativeOverlap ped*
    nativeOverlappe d = 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


  • Muscha

    #2
    Re: "Unable to read data from the transport connection&quot ; exception

    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.IOExc eption: Unable to read data from the
    transport connection. ---> System.ObjectDi sposedException : Cannot access a
    disposed object.
    at System.Threadin g.ManualResetEv ent.Reset()
    at System.Net.Conn ection.ReadCall back(IAsyncResu lt asyncResult)
    --- End of inner exception stack trace ---
    at System.Net.Conn ection.ReadCall back(IAsyncResu lt asyncResult)
    at System.Net.Lazy AsyncResult.Inv okeCallback()
    at System.Net.Lazy AsyncResult.Inv okeCallback(Boo lean
    completedSynchr onously,Object result)
    at System.Net.Sock ets.OverlappedA syncResult.Comp letionPortCallb ack(UInt32
    errorCode, UInt32 numBytes, NativeOverlappe d* nativeOverlappe d)

    Any help will be much appreciated.

    thanks,

    /m

    [color=blue]
    > 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[/color]
    none[color=blue]
    > of my code and the following is the call stack:
    >
    >
    > system.dll!Syst em.Net.Connecti on.ReadCallback (System.IAsyncR esult
    > asyncResult = {System.Net.Soc kets.Overlapped AsyncResult}) + 0x37d bytes
    >
    >
    >
    > system.dll!Syst em.Net.LazyAsyn cResult.InvokeC allback() + 0x27 bytes
    >
    >
    >
    > system.dll!Syst em.Net.LazyAsyn cResult.InvokeC allback(bool
    > completedSynchr onously = false, System.Object result = {0}) + 0x23 bytes
    >
    >
    >
    >[/color]
    system.dll!Syst em.Net.Sockets. OverlappedAsync Result.Completi onPortCallback( u[color=blue]
    > int errorCode = 10038, uint numBytes = 0,[/color]
    System.Threadin g.NativeOverlap ped*[color=blue]
    > nativeOverlappe d = 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
    >
    >[/color]


    Comment

    Working...