How to find out all active sessions in the asp.net web server??

K

Krish...........

Hi all,

How to find out no of active sessions (at a time) in the web
server.. I dont think handling Session_start and Session_end events
are useful for this. Is there any way to find all current active
sessions by using Application object ?

Thanx,
Krish....
 
G

Guest

Hi all,

How to find out no of active sessions (at a time) in the web
server.. I dont think handling Session_start and Session_end events
are useful for this. Is there any way to find all current active
sessions by using Application object ?


It can be done via Application level object/collection, each of the
session objects can be counted on Session_OnStart and deleted on
Session_OnEnd. However, Session_OnEnd is unreliable and this approach
(if with no any additional logic, e.g. checking the time expired)
could give you wrong number of session. Because of this, and if you
need to be more accurate, you can add the new sessions in the database
table (sessionID and time) and query this table.
 

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,056
Latest member
GlycogenSupporthealth

Latest Threads

Top