Get All Sessions

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

Chris

Is there a way for me to get every session that is running at the time of a
client connect?

Thanks

Chris
 
Hi Chris,

Not exactly. Sessions are sandboxed, and can't access one another. However,
they can all access Application Scope. So Application is wehre you can put
some reference to a Session. You still can't actually access the Session
there, though.

Perhaps the best thing would be to put a Collection into the Application
Cache, and emulate Sessions there. The Session_Start method could create a
member of that Collection in the Application, and identify it with the
unique SessionID that the Session generates, which could then be used to
access the element in the Collection that "stands for" that Session.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
What You Seek Is What You Get.
 
Not unless your using some form of server farm and storing them in a
database

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director
 
Back
Top