I'm not sure if this can lead you in the right direction or not ... I have a similar service where, when I look in my Subscribe () method, I can access this:
var context = OperationContext.Current; var sessionId = context.SessionId; var currentClient = context.GetCallbackChannel<IClient>(); context.OutgoingMessageHeaders.Clear(); context.OutgoingMessageProperties.Clear();
Now, if you had a way to use the IClient object and to access the context in which you received the IClient instance (allow its context), could the following two statements be executed to do what you want?
context.OutgoingMessageHeaders.Clear(); context.OutgoingMessageProperties.Clear();
Just quick steps from my thoughts. I would like to know if this will fix it or not, for personal information, if nothing else. Could you cache OperationContext as part of a SubscriptionObject that will contain 2 properties, the first of which relates to OperationContext, and the second to your IClient.
source share