Closed tomasr closed 8 years ago
This is not a problem on .NET 4.6.2, where WCF correctly flows the OperationContext across async calls.
OperationContext
The fix for 4.5 - 4.6.1 would be to use AsyncLocal<T> to capture a reference to WcfOperationContext, but this is only supported in .NET 4.6, not 4.5.
AsyncLocal<T>
WcfOperationContext
So switching to use the LogicallCallContext as a work around, which should work on all of these. This should improve https://github.com/Microsoft/ApplicationInsights-SDK-Labs/issues/65
@SergeyKanzhelev Any chance you can merge this one whenever you can?
Sorry for delay merging it
This is not a problem on .NET 4.6.2, where WCF correctly flows the
OperationContext
across async calls.The fix for 4.5 - 4.6.1 would be to use
AsyncLocal<T>
to capture a reference toWcfOperationContext
, but this is only supported in .NET 4.6, not 4.5.So switching to use the LogicallCallContext as a work around, which should work on all of these. This should improve https://github.com/Microsoft/ApplicationInsights-SDK-Labs/issues/65