I put some data in the call context ( CallContext.SetData(key,data) ), where the data is of type that implements ILogicalThreadAffinative . The reason it implements ILogicalThreadAffinative is because it must be shared across multiple threads in the current application.
However, the application also makes remote calls to another service, and this is where the problem arises. My implementation of ILogicalThreadAffinative is not serializable and should not be. Even if I were marked serializable, the remote application does not have access to the assembly in which the type is declared, so it will not be able to deserialize it.
So, how do I share the call context data in my application (AppDomain), but not with every external application that you need to talk to?
Kenneth Baltrinic
source share