System.Web.HttpCookie.Secure Property

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

Syntax

public bool Secure { set; get; }

Value

True if the value was transmited over a secure connection.

Remarks

To set the transmission of cookies using SSL for an entire application, enable it in the application's configuration file, Web.config, which resides in the root directory of the application. For more information, see httpCookies Element (ASP.NET Settings Schema). Values set programmatically using the HttpCookie.Secure property override values set in the Web.config file.

When dealing with sensitive information, it is strongly recommended that you use HTTPS protocol with SSL encryption. SSL protects against data being altered (data integrity), protects a user's identity (confidentiality), and assures that data originates from the expected client (authentication). For more information on the benefits of encryption, see Cryptography Overview. For more information about configuring SSL on an Internet Information Services (IIS) Web server, see tp://go.microsoft.com/fwlink/?LinkId=38553.

Requirements

Namespace: System.Web
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0