c# - How to make WCF Service take only one call at a time -
we have wcf service
public class myservice { [operationcontract] public void opperationa() { } [operationcontract] public void opperationb() { } [operationcontract] public void opperationc() { } [operationcontract] public void opperationd() { } }
we have client wcf service windows service invokes operations above operationa/b/c/d new proxies.
with current implementation have there issues client invoking operations @ same time.
instancecontextmode = percall , concurrencymode = single
is there combination of instancecontextmode , concurrency can change service take 1 request @ time, mean if client proxy has called operationa , service processing request , if client proxy b tries call operationb (or other operation), should blocked until first request finished.
thanks
it should sufficient change instancecontextmode single. msdn documentation here:
concurrencymode=single : service instance single-threaded , not accept reentrant calls. if instancecontextmode property single, , additional messages arrive while instance services call, these messages must wait until service available or until messages time out.
Comments
Post a Comment