You can configure Forms Authentication in ASP.NET to
expire after a certain time and optionally use sliding expiration by setting attributes in the
<forms> element of your web.config.
We use cookies to ensure you have the best browsing experience on our website. By using our site, you
acknowledge that you have read and understood our
Cookie Policy &
Privacy Policy.
You can configure Forms Authentication in ASP.NET to expire after a certain time and optionally use sliding expiration by setting attributes in the
<forms>element of yourweb.config.Configuration in
web.configExplanation of Key Attributes
timeout="30"slidingExpiration="true"slidingExpiration="false"timeoutminutes after creation, no matter how many requests are made.requireSSL="true"protection="All"cookieless="UseCookies"Example Behavior
timeout="30"andslidingExpiration="true":slidingExpiration="false":Best Practices
slidingExpiration="true"to enhance user experience for active users.