ASP.net Session Destroy if he closes the browser

前端 未结 8 1105
孤独总比滥情好
孤独总比滥情好 2021-01-17 03:34

I have an website. When the user is logged the session details will loaded. When the user logged out the session details will abandoned. (Log out by clicking the logout menu

8条回答
  •  天涯浪人
    2021-01-17 04:14

    It sounds like you are using a persistent cookie to store the authentication ticket. Try setting the second parameter (createPersistentCookie) of the SetAuthCookie method to false, i.e. FormsAuthentication.SetAuthCookie("myusername", false);

提交回复
热议问题