WCF: Service that only allows a single client and rejects others -


I need to create a WCF service that allows only one customer at one time. All other requests must be rejected, and the client should try again later.

I have tried:

but if I request multiple times the service (using multiple sources) in the client, then I get a discount on the third request, but service is actually the third processing request!

You can also see the "service torturing" behavior, which allows you to specify on the server side There are many contemporary examples, concurrent calls and concurrent sessions that you want to support - set them all to 1, and you should have your own behavior.

  & lt; Behaviors & gt; & Lt; ServiceBehaviors & gt; & Lt; Behavior name = "thorsted" & gt; & Lt; ServiceExpression Maximal call = "1" Maximum Resource Session = "1" Maximal Symbols = "1" /> & Lt; / Behavior & gt; & Lt; / ServiceBehaviors & gt; & Lt; / Behavior & gt;  

Mark


Comments