How many users connected to IIS?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way to programatically tell how many users are connected to IIS
with c#?
Or maybe some API?

I don't want to restrict a certain amout of users, just restrict some
features.

Thanks in advance.
Sid S.
 
You could use an application level variable (assuming when you say IIS you
are refering to just a specific app on the server) and increment/decrement
when the session starts and stops.

Keep in mind that there is probably no way of knowing if the user is still
connected other then waiting for the session to die. Which means that if
the user accesses just one page, then walks away, the server will still
think the user is active for like 20 minutes.
 
Back
Top