Session End in ASP.net MVC

前端 未结 4 747
执念已碎
执念已碎 2020-12-07 21:38

I am placing user data in the session then passing it to viewdata to view on a page. Now when my user walks away from his computer for a while, the session ends and the data

4条回答
  •  庸人自扰
    2020-12-07 22:08

    I'm assuming you're authenticating the user in some way, but are you using Forms Authentication?:

    ASP.Net MVC Framework - Using Forms Authentication

    If you're already using Forms Authentication, you need to make sure that the authentication cookie expiration time is just a bit shorter than your Session timout.

提交回复
热议问题