SessionId re-generated on each page hit


If the session is not used at all on a page then the sessionId will get trashed.  To maintain the same sessionId, when you have pages which don’t use the session, you just have to add some kind of call

protected void Page_PreInit(object sender, EventArgs e)
{
    //Need this line otherwise it resets the Session Id everytime!
    Session["keepme"] = "True";

Related posts:

  1. No comments yet.
(will not be published)