RoleManagerSection::CookieSlidingExpiration Property
Gets or sets a value indicating whether the cookie that is used to cache role names will be reset periodically.
Assembly: System.Web (in System.Web.dll)
[ConfigurationPropertyAttribute(L"cookieSlidingExpiration", DefaultValue = true)] public: property bool CookieSlidingExpiration { bool get (); void set (bool value); }
Property Value
Type: System::Booleantrue if the role names cookie expiration date and time will be reset periodically; otherwise, false. The default is true.
You can specify whether the cookie that is used to cache role names is periodically reset or expired at a fixed point in time by using the cookieSlidingExpiration attribute in the Web.config file for your ASP.NET application. If true, the cookie expiration is initially set to the current date and time plus the CookieTimeout property, in minutes. While the user continues to actively use the ASP.NET application, the expiration date and time of the cookie is automatically refreshed, if there is less than half of the CookieTimeout remaining. The default is true.
The following code example demonstrates how to use the CookieSlidingExpiration property. This code example is part of a larger example provided for the RoleManagerSection class.
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.