Kkrockz
Kkrockz

Reputation: 25

Getting an Error as Object Disposed Exception

application.exe

ObjectDisposedException
System.Net.Sockets.NetworkStream

at System.Net.Sockets.NetworkStream.Write()
at CoreLab.Oracle.CoreLab1Oracle.a()
..

I need to replicate the issue and I don't understand what causes this error.

Can anyone explain under what conditions this exception is thrown ?

Upvotes: 0

Views: 378

Answers (1)

Marc Gravell
Marc Gravell

Reputation: 1062620

Without more context, all we can tell you is that some code (whatever CoreLab.Oracle.CoreLab1Oracle.a() is) tried to Write to a NetworkStream that had already been disposed. This could be as simple as "a socket became disconnected", or could be more complex involving your usage of the objects, and potentially explicitly calling Dispose() (or implicitly via using) too early. Or it could just be as simple as "just a bug".

But fundamentally, we can't debug that without a lot more information. Is CoreLab.Oracle.CoreLab1Oracle your own code? or some library that you are using?

Upvotes: 1

Related Questions