Session ID keeps changing

Discussion in 'ASP.NET / ASP.NET Core' started by marc12, Feb 21, 2004.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. Found this at
    http://msdn.microsoft.com/library/d...ry/en-us/dnaspp/html/aspnetsessionstate.asp?f

    "An important point about ASP.NET session management is that the life of a session state object begins only when the first item is added to the in-memory dictionary. Only after executing code like in the following snippet, can an ASP.NET session be considered started."

    Session["MySlot"] = "Some data";

    So I included the comparable VB code in my app and that fixed it.
     
  2. I have a simple VB aspx page with the following in Page_Load:

    objSession = Context.Session()
    Textbox2.Text = objSession.SessionID()

    There is a Button2_Click class which for now doesn't do much except to cause a page load. On my development system the value of the SessionID remains constant when I continually click button2. That's the desired behavior. But on my DASP site the sessionID continually changes.

    My web.config contains the following:

    <sessionState mode="InProc" cookieless="false" timeout="20" />

    How do I keep the session state constant?

    Thanks,
    Marc
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page