why does sessionid changes

Last post 09-28-2005 5:50 PM by Kumar Reddi. 2 replies.

Sort Posts:

  • why does sessionid changes

    09-28-2005, 2:38 PM
    • Member
      60 point Member
    • stone
    • Member since 08-05-2005, 1:43 PM
    • Posts 12

    Hi,
    I need to keep the record of session id for each user request, but Sessionid changes with every refresh action.
    Web.config file:
    <configuration>
      <system.web>
        <sessionState timeout="60" />
      </system.web>
     </configuration>
    What could be the reason? (i tested with ip and domain name, but it is not the issue)

    thank you very much

    karakas

  • Re: why does sessionid changes

    09-28-2005, 4:08 PM
    • Contributor
      3,351 point Contributor
    • UkBtlog
    • Member since 07-12-2005, 1:07 PM
    • London
    • Posts 662
    If it is your first access to the page and you are just hitting F5 to refresh you are actually creating a new session each time as the session cookie does not exist in your refresh request only on subsequent page navigation through the site.
  • Re: why does sessionid changes

    09-28-2005, 5:50 PM
    • Star
      12,874 point Star
    • Kumar Reddi
    • Member since 11-11-2004, 4:54 PM
    • Virginia
    • Posts 2,357
     UkBtlog wrote:
    If it is your first access to the page and you are just hitting F5 to refresh you are actually creating a new session each time as the session cookie does not exist in your refresh request only on subsequent page navigation through the site.


    I am afraid thats not correct. As soon as the HTTP response comes back from the server, you have the session cookie. Even if its the first request to the server, you would still have the same session id no matter how many times you refresh, as the server allready sent the session cookie in its first response...

    Now to the actual problem, it could be that the browser is not accepting the cookies. Try with cookieless session mode and see if its the browser thats the culprit
    Kumar Reddi
Page 1 of 1 (3 items)