HttpCookie.Secure Property
Definition
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.
Get or set the security level for the HttpCookie.
public:
property bool Secure { bool get(); void set(bool value); };
bool Secure();
void Secure(bool value);
public bool Secure { get; set; }
var boolean = httpCookie.secure;
httpCookie.secure = boolean;
Public Property Secure As Boolean
Property Value
bool
The security level for the HttpCookie.
true if the client is only to return the cookie in subsequent requests if those requests use HTTPS; otherwise, false. The default is false.
Remarks
When this property is true, this HTTP cookie may be sent only with https:// requests. This provides additional security since this prevents network sniffing the value of the cookie.