Counting Active Sessions

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.
 
S

Steve C. Orr [MVP, MCSD]

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.
 
B

Brad B

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.
 

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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top