Logout from MVC

前端 未结 4 415
南旧
南旧 2021-01-07 09:56

I have a MVC application and I have to logout. To logout from the application I have created a link on te master page

[ 

        
4条回答
  •  迷失自我
    2021-01-07 10:43

    Hi got the solution. Actually I have used toke to login into my module and the token timeout was 5 second. If I Logged out and click on the back button of the browser before the 5 second then the Session_Start() event of glowal.ascx.cs is called again and read the token again and the create the session again. And if I click on the back button after the 5 second then session does not create. To solve this problem I does not allow the user to go to back through the browser. For this I have used the following code

    
    

提交回复
热议问题