CookieHandlerElement.PersistentSessionLifetime Property

.NET Framework (current version)

The .NET API Reference documentation has a new home. Visit the .NET API Browser on to see the new experience.

Gets or sets the lifetime of cookies issued by the handler.

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

	DefaultValue = "0:0:0", IsRequired = false)]
[TimeSpanValidatorAttribute(MinValueString = "0:0:0", MaxValueString = "365.0:0:0")]
public TimeSpan PersistentSessionLifetime { get; set; }

Property Value

Type: System.TimeSpan

A TimeSpan that represents the cookie lifetime. The default is 0 days (“0.0:0:0”). The value must be a value between 0 (“0.0:0:0”) and 365 (“365.0:0:0”) days.

Represents the persistentSessionLifetime attribute of the <cookieHandler> element.

.NET Framework
Available since 4.5
Return to top