SessionID keeps changing in ASP.NET MVC why?

前端 未结 8 1547
傲寒
傲寒 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:32

    Try with adding machine key into your web.config:
    Online key generator: http://aspnetresources.com/tools/keycreator.aspx It seems that server resets machine key for client and generates new one with new session id, every few minutes, which is much lower than it should. Don't know if that's bug or feature:)
    Also, you can increase your session state timeout, which is i think 20min by default.

提交回复
热议问题