CookieOptions.Secure Property

Definition

Gets or sets a value that indicates whether to transmit the cookie using Secure Sockets Layer (SSL)--that is, over HTTPS only.

C#
public bool Secure { get; set; }

Property Value

true to transmit the cookie only over an SSL connection (HTTPS); otherwise, false.

Applies to

Tuote Versiot
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0