ObjectDisposedException when sending message

Jul 26, 2014 at 2:56 PM
I'm getting "ObjectDisposedException" exception after connect and trying to create the session:

conn = new Connection(address);
var amqpSession = new Session(conn);

After invoke of 'new Session(conn)' the exception is thrown here:

public static ProtocolHeader ReadHeader(ITransport transport)
    {
        byte[] smallBuffer = new byte[8];
        if (!ReadBuffer(transport, smallBuffer, 0, 8))
        {
            throw new ObjectDisposedException(transport.GetType().Name);
        }
. . .

How can I find out the reason for this failure?

Here is a trace:

SEND AMQP 3 1 0 0
SEND sasl-init(mechanism:PLAIN,initial-response:********,hostname:obfuscated.servicebus.windows.net)
RECV AMQP 3 1 0 0
RECV sasl-mechanisms(sasl-server-mechanisms:System.Object[])
RECV sasl-outcome(code:0,additional-data:57656C636F6D6521)
SEND AMQP 0 1.0.0
#### Exception System.ObjectDisposedException - 0x00000000 (7) ####
#### Message: SaslTransport
#### Amqp.Framing.Reader::ReadHeader [IP: 001c] ####
#### Amqp.Connection+Pump::PumpThread [IP: 000c] ####
A first chance exception of type 'System.ObjectDisposedException' occurred in Amqp.NetMF.dll
Additional information: SaslTransport


Please note that I'm able to send the message via HTTPS/client!
Editor
Jul 26, 2014 at 3:00 PM
HI,
I have already replied in the previous discussion you opened :

https://amqpnetlite.codeplex.com/discussions/554203

During Session creation some messages are exchanged (received and sent) so it is the same problem ;-)

Paolo.