CookieHandlerElement.RequireSsl Property

.NET Framework (current version)
 
System_CAPS_noteNote

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

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)

[ConfigurationPropertyAttribute("requireSsl", IsRequired = false, 
	DefaultValue = true)]
public 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 is emitted for any cookies written. If this value is true, the sign-in session cookies will only be available over HTTPS.

Represents the requireSSL attribute of the <cookieHandler> element.

.NET Framework
Available since 4.5
Return to top
Show: