CookieHandler.PersistentSessionLifetime Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
The lifetime of persistent sessions. If zero, transient sessions are always used.
public:
virtual property Nullable<TimeSpan> PersistentSessionLifetime { Nullable<TimeSpan> get(); void set(Nullable<TimeSpan> value); };
public virtual TimeSpan? PersistentSessionLifetime { get; set; }
member this.PersistentSessionLifetime : Nullable<TimeSpan> with get, set
Public Overridable Property PersistentSessionLifetime As Nullable(Of TimeSpan)
Property Value
The session lifetime. The default is null
.
Exceptions
A value that is less than zero is specified.
Remarks
Tickets for persistent sessions are stored in file-based cookies, meaning that the sign-in session may continue after the web browser is closed and reopened.
This property is used to set the HttpCookie.Expires property.
The property can be initialized by specifying the persistentSessionLifetime
attribute on the <cookieHandler> element in configuration.