dotnet / dotnet/wcf

Exception SFxCallbackRequestReplyInOrder1 in System.ServiceModel.Channels.ServiceChannel when using ConcurrencyMode.Multiple

Open
#5,861 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
1.8k
Forks
576
Avg merge
6d 9h
Merged PRs (30d)
2

Description

My service using `ConcurrencyMode.Multiple` and my Framework code is identical to NET code.
NET code sometimes throws `SFxCallbackRequestReplyInOrder1` exceptions in `System.ServiceModel.Channels.ServiceChannel` on client side.
While debugging my Framework code, I see that `OperationContext.Current` is always null and anyway `ConcurrencyMode.Single`, in NET code `OperationContext.Current` is not null and this results in an exception.
https://github.com/dotnet/wcf/blob/9bd5ad41c7d88e4d5dcc435e230cd5cb18b064a2/src/System.ServiceModel.Primitives/src/System/ServiceModel/Channels/ServiceChannel.cs#L526-L541

This led me to this section of code where the `OperationContext.Current` value is assigned.
https://github.com/dotnet/wcf/blob/9bd5ad41c7d88e4d5dcc435e230cd5cb18b064a2/src/System.ServiceModel.Primitives/src/System/ServiceModel/Dispatcher/MessageRpc.cs#L397-L475
I noticed that the Framework code uses `OperationContext.Holder` instead of `OperationContext.Current`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.