CookieHandler.RequireSsl Property
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.
Gets or sets a value that specifies whether the cookie should be used only with SSL.
public:
virtual property bool RequireSsl { bool get(); void set(bool value); };
public virtual bool RequireSsl { get; set; }
member this.RequireSsl : bool with get, set
Public Overridable Property RequireSsl As 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.
Product | Versions |
---|---|
.NET Framework | 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1 |
.NET feedback
.NET is an open source project. Select a link to provide feedback: