Posted by: The Code Project Latest Articles, on 31 May 2009
Helps to view all the active Session IDs, Session Keys, and Session Values in an ASP.NET application.
Introduction
As far as I know, in ASP.NET, we do not have a predefined class library to find out all the active session IDs and their data. This article helps you list all the active session keys using a simple logic.
Background
This code can be used to track the active sessions of an application.
Using the code
This simple application has two pages: one to view the data (Manager.aspx) and the other to enter the current date time into the session.
In the application, create a variable of type Dictionary<string, HttpSessionState>
and store it into the application memory. It facilitates us to keep the “Session IDs” of all the sessions and a “Session” object reference. read more...