Gets a value indicating whether sliding expiration is enabled.
Assembly: System.Web (in System.Web.dll)
The property value is set using the slidingExpiration attribute of the forms configuration element.
Sliding expiration resets the expiration time for a valid authentication cookie if a request is made and more than half of the timeout interval has elapsed. If the cookie expires, the user must re-authenticate. Setting the property to false can improve the security of an application by limiting the time for which an authentication cookie is valid, based on the configured timeout value.
We recommend that if you configure requireSSL as false, you also configure slidingExpiration as false, to reduce the amount of time for which a ticket is valid.
The following code example sets the slidingExpiration attribute to false in the Web.config file for an ASP.NET application.
<authentication mode="Forms"> <forms loginUrl="member_login.aspx" name=".ASPXFORMSAUTH" cookieless="UseCookies" requireSSL="true" slidingExpiration="false" /> </authentication>
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.