Counting Active Sessions

  • Thread starter Thread starter Brad B.
  • Start date Start date
B

Brad B.

I am trying to enforce a licence for my web application
based on the number of active sessions. Each time a new
user accesses the app, I want to check this to see if
over the limit.

Unfortunately, Can't find a way to check this in
ASP.NET. Looked at performanceCounters but have not had
any success there.

Anyone got any ideas?

Thanks.
 
There is no automatic way to get the session count. You must build such a
mechanism manually by utilizing the Session_Start and Session_End events in
your Global.asax. In there you can increment and decrement a counter, array
or collection of some sort to keep track of the sessions.
 
Steve,

Much appreciate the response.
Also, this is unfortunate that this is the only known
solution, as the 'product' we are making is marketed to
developers. Thus, they have control over what they put
in their global.asax file. The mechanism will work, but
no way for us to enforce it, as global.asax is all "open"
and they can do what they want with it as developers.
Darn.. Sure need a way.
 
Back
Top