How can I make a single WCF method ConcurrencyMode.Multiple when service is ConcurencyMode.Single
I have a service which is defined as ConcurrencyMode.Single:
[ServiceBehavior(ConcurrencyMode = ConcurrencyMode.Single,
UseSynchronizationContext = false,
InstanceContextMode = InstanceContextMode.PerSession,
IncludeExceptionDetailInFaults = true)]
public class MyService : IMyService
This service provides a method to tell the client what it's currently working on:
[OperationContract]
string GetCurrentTaskDescription();
Is there a way to make this开发者_JAVA百科 particular method allowable while another long-running task is running where all other methods still follow the single-threaded concurrency model?
You can't make methods have an instance context mode.
If you really need a single threaded set of calls and one multithreaded set of calls you will need to create a new service contract for this call.
精彩评论