locked
Cannot access a disposed object RRS feed

  • Question

  •  

    Hi,

     

    I am getting an error when try to access a WCF method from a client layer.

     

    Error:

    Cannot access a disposed object.

    Object name: 'System.ServiceModel.Channels.ServiceChannel'.

     

    Please suggest what could be the issue, as this was working earlier but not now.

    Thursday, December 27, 2007 9:50 AM

Answers

  •  

    Hi James,

     

    Thanks for your response. I got the issue. I was using the object second time without clearing the reference, it solved my problem.

     

    Thanks.

    Thursday, January 10, 2008 10:49 AM

All replies

  •  

    Can you post your code?  It sounds like the channel was closed.  Maybe an 'isTerminating' method was called?

     

    -James

     

    Thursday, December 27, 2007 5:52 PM
  •  

    Hi James,

     

    Thanks for your response. I got the issue. I was using the object second time without clearing the reference, it solved my problem.

     

    Thanks.

    Thursday, January 10, 2008 10:49 AM