ASP.NET Automatic logout

后端 未结 5 1179
我在风中等你
我在风中等你 2021-01-01 06:12

I am doing a group project with 4 other people. We are designing a job kiosk in ASP.NET in MVC4 with embedded c#.

I am working on having the system log the user out

5条回答
  •  离开以前
    2021-01-01 06:56

    the answer you are looking for is the one AliK suggested. You want to set an automatic timeout in the web.config so that it will automatically logout the user and redirect them to the login page after a certain amount of idle time.

    
       
       
    
    

    If I remember right, the timeout value is in minutes, not seconds or milliseconds. Also the sliding Expiration means that the timeout will reset each time you perform an action on the website. So if you have a timeout of 5 minutes and you sit idle for 4 before clicking a button on the site then after the button click you get a new 5 minute timeout.

提交回复
热议问题