Counting the number of open requests to a web service...

S

Sinex

Hi,
I am developing a web service. I want to restrict the number of concurrent
requests that can be made to my service. I guess I need some kind of global
counter that will indicate the number of open requests...but I dont know the
..net classes that will help me do this...and where do I have to write this
code?

Sinex
 
B

Ben Rush

I think you're looking at this at the wrong level.

Assuming you're not self-hosting this service using WCF or something like
that, you can adjust the maximum number of concurrent requests a particular
web application can sustain from within the IIS snap-in (I believe the
Performance tab).

If you're worrying about limitations for the entire application (which I
assume is true, even though you didn't mention it) I don't have a fool-proof
answer for you. Rather than a global variable, though, I would at least
recommend a database variable or file system-backed counter file.

....perhaps someone else has encountered this and knows a better way around
it.

--
~~~~~~~~~~~~~~~~~~~~~~~~~~
Ben Rush
Microsoft .NET Consultant
http://www.ben-rush.net/blog
http://www.sideshowsystems.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,773
Messages
2,569,594
Members
45,119
Latest member
IrmaNorcro
Top