In an ASP. NET Web site, when using Forms authentication, the general settings are as follows:
<authentication mode= "Forms" >
<forms name= "Yourauthcookie" loginurl= "/login" protection= "All" path= "/" timeout= "" requiressl= "true"/>
</authentication>
Here timeout is set to 20 minutes, meaning that the user logged into the system, if 20 minutes without any action on the system, the user login session will automatically expire, the system will automatically log out of the login (need to manually refresh the page, you will find the system automatically redirect to the login page)
If you add slidingexpiration, such as set to Slidingexpiration= "false", change to the following:
<authentication mode= "Forms" >
<forms name= "Yourauthcookie" loginurl= "/login" protection= "All" path= "/" timeout= "requiressl=" "true" Slidingexpiration= "false"/>
</authentication>
This means that from the moment the user logs on to the system, 20 minutes after the login, the system will automatically expire, not from the moment of no action on the system.
However, I still have some doubts about this, if from the moment of login, has been operating, is it 20 minutes later, the system will also be logged out of the state?
Settings in the SlidingExpiration setting in forms in the Web. config