is it possible to iterate through all the active sessions of an ASP.net application

  • Thread starter Thread starter Chris Hayes
  • Start date Start date
C

Chris Hayes

Is it possible to iterate through all the active sessions of an ASP.net
application?

I have this fancy user object (with all kinds of properties) that I set as a
session level object on session start and I'd like to be able to find a
specific user's session so that I can make modifications to the fancy user
object (ie. add a note to the session, or change some properties within it,
or even end/kill the session!).

So simply put is there any way to track down a specific session? And if so
how (preferrably in a way that can be coded in ASP.NET)?

It would be kind of nice to have a page the listed all the active sessions
in the ASP.NET application... Perhaps my dreams are greater than what the
technology allows at this point...

Any help or insight is greatly appreciated.

Chris
 
You would have to have an Application level object, store references to each
of the session objects. So something like an arraylist, to which you add
each session object every time a new session is created. Be sure to delete
the object from you collection once the session expires.
 
Back
Top