Counting user request in Service Contract

402 views Asked by At

I am developing a WCF service that has to process only one user request at a time. Other request has to be queued up and if the queue gets big then then other request are stored in the database and users are notified accordingly. I was able to get user queue by implementing service throttling in WCF but users gets request timed out error when the queue is long. For request throttling I used WCF service throttling on service contract 2.

[ServiceBehavior(InstanceContextMode = InstanceContextMode.Single, ConcurrencyMode = ConcurrencyMode.Single)]

But for Service Contract 1, I have implemented

[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerSession, ConcurrencyMode = ConcurrencyMode.Multiple)]

I tried counting the pending request from WCF throttling service, but it seems there is no such method that gives current queue list in WCF.

  1. Is there any method that can count the queue list in another service contract.
  2. Do I have to change my design to implement this flow in WCF service.

enter image description here

1

There are 1 answers

3
SteveFerg On

Under IIS manager, Application Pools -> Advanced Settings you can set the Queue length to something larger as needed: enter image description here