Aracılığıyla paylaş


HttpCookie.Secure Property

Definition

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

Boolean

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.

Applies to