Exception while obtaining of ContextManager

Damir Dobric Posts

Next talks:

 

    

Follow me on Twitter: #ddobric



 

 

Archives

During implementation of "correlation" (using of context manager etc.) in Workflow Service based on *HttpContextBindig , you may get following error while obtaining the context manager instance:

"Cannot obtain fields or call methods on the instance of type 'System.ServiceModel.Channels.IChannel' because it is a proxy to a remote object"

The code I used to obtain the context instance is shown below:

proxy.InnerChannel.GetProperty<IContextManager>();

Note that this exception is thrown when executing this code in immediate window in debugger only. When the same code is executed in the program's execution sequence it will work fine.


Posted Mar 29 2008, 03:06 PM by Damir Dobric
Filed under: ,
developers.de is a .Net Community Blog powered by daenet GmbH.