developers.de
daenet's .NET Community

Exception while obtaining of ContextManager

Damir Dobric Posts

 

Damir@Phone    



My upcoming sessions:

AppFabric Applications at
NRW Conf 2011
09.Sept.2011 Wuppertal

HTML5 widgets in WP7+
Monodroid
Mobility Day
21.Sept.2011 - Zagreb

AppFabric and WCF sessions at
Advanced Developer Conference
26.-27. Oktober 2011 in Frankenthal

AppFabric Applications, queues, topics and more at
Prio Conference
02. - 03. November 2011 in Meistersingerhalle Nürnberg

AppFabric Applications deep dive hosted by
.NET User Group Frankfurt
17.Nov.2011 18.30-22.30 Microsoft - Bad Homburg 

 

 

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: ,

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
daenet GmbH