Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

CookieHandler.PersistentSessionLifetime Property

.NET Framework 4.6 and 4.5

The lifetime of persistent sessions. If zero, transient sessions are always used.

Namespace:  System.IdentityModel.Services
Assembly:  System.IdentityModel.Services (in System.IdentityModel.Services.dll)

public virtual Nullable<TimeSpan> PersistentSessionLifetime { get; set; }

Property Value

Type: System.Nullable<TimeSpan>
The session lifetime. The default is null.

ExceptionCondition
ArgumentOutOfRangeException

A value that is less than zero is specified.

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.

.NET Framework

Supported in: 4.6, 4.5
Show:
© 2015 Microsoft