how can I get IDs of all current sessions?
You can use Global.asax
file and set the Session at Session_Start
event. See below
in Global.asax
file you can do something like this:
protected void Session_Start(object sender, EventArgs e)
{
Session["sid"] = Session.SessionID;
Session["sid"] = "Test";
}
Then in your WebForm you can get the Session ID and Value like below
protected void Page_Load(object sender, EventArgs e)
{
Response.Write("Session ID is:" + Session.SessionID.ToString()+ "
");
Response.Write("Session value is:" + Session["sid"].ToString());
}
For details, see http://www.dotnetcurry.com/ShowArticle.aspx?ID=126