Settings in the SlidingExpiration setting in forms in the Web. config

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.