Search code examples
.netwcftask-parallel-libraryoperationcontext

Keep OperationContext in task parallel library


we have somewhere in a deep abstraction assembly a WCF behavior that reads data from the OperationContext.Current, when this code is executed from within a Task, the OperationContext.Current is empty, is it possible to solve this inside the abstraction assembly or will we need to add some code to all consumers of this assembly?


Solution

  • Seems the only way is to add something to the CallContext, just like the current Principal is stored...