CookieHandler.RequireSsl Property

.NET Framework (current version)

Gets or sets a value that specifies whether the cookie should be used only with SSL.

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

public virtual bool RequireSsl { get; set; }

Property Value

Type: System.Boolean

true if the cookie should only be used over an SSL connection; otherwise, false. The default is true.

Controls whether the "Secure" flag in the Set-Cookie header is emitted for any cookies written. If this value is true, the session cookies will only be available over HTTPS.

This property corresponds to the HttpCookie.Secure property.

The property can be initialized by specifying the requireSSL attribute on the <cookieHandler> element in configuration.

.NET Framework
Available since 4.5
Return to top