Editar

Partilhar via


HttpCookiesSection.RequireSSL Property

Definition

Gets or sets a value indicating whether Secure Sockets Layer (SSL) communication is required.

This API supports the product infrastructure and is not intended to be used directly from your code.

public:
 property bool RequireSSL { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("requireSSL", DefaultValue=false)]
public bool RequireSSL { get; set; }
[<System.Configuration.ConfigurationProperty("requireSSL", DefaultValue=false)>]
member this.RequireSSL : bool with get, set
Public Property RequireSSL As Boolean

Property Value

true if SSL is enabled; otherwise, false. The default is false.

Attributes

Examples

The following code example shows how to use the RequireSSL property.


// Get the current RequireSSL.
Boolean requireSSLValue = 
    httpCookiesSection.RequireSSL;

// Set the RequireSSL.
httpCookiesSection.RequireSSL = 
    false;

' Get the current RequireSSL.
Dim requireSSLValue As Boolean = _
httpCookiesSection.RequireSSL

' Set the RequireSSL.
httpCookiesSection.RequireSSL = _
False

Remarks

The RequireSSL property enables or disables output of the secure cookie attribute as described in RFC 2109. When used by compliant browsers, the cookie will only be sent back over a connection using SSL/TLS. The default is false.

Applies to

See also