0
votes

I have a COM object that creates an instance of a WCF service and passes a handle to itself as a callback. The COM object is marked/initialized as MTA.

The problem being every instance of the WCF service that makes a call to the callback occurs on the same thread, so they are being processed one at a time which is causing session timeouts under heavy load. The WCF service is session-based, and I am not sure if that makes any difference.

1

1 Answers

1
votes

You could decorate the callback implementation with the CallbackBehavior attribute and set ConcurrencyMode to ConcurrencyMode.Multiple. The default setting is ConcurrencyMode.Single which restricts to one service callback at a time. Of course if you do that you must ensure your callback implementation is thread safe.