SessionID keeps changing in ASP.NET MVC why?

前端 未结 8 1551
傲寒
傲寒 2020-12-08 02:02

I am trying to keep track of something and using the SessionID as they key to that object

However the SessionID every 2-3 reqiests changes shouldn\'t it remain the s

8条回答
  •  暖寄归人
    2020-12-08 02:44

    If you look the seession ID cookie is not even sent to the browser unless it's used on the server.

    So when a page roundtrips there is no current session ID cookie, so a new session ID is created, hence it is random.

    This is logical, why bother tying up the app to a session if the session is not in use?

提交回复
热议问题