HttpCookiesSection.RequireSSL Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

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

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

Namespace:   System.Web.Configuration
Assembly:  System.Web (in System.Web.dll)

<ConfigurationPropertyAttribute("requireSSL", DefaultValue := False)>
Public Property RequireSSL As Boolean

Property Value

Type: System.Boolean

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

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.

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


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

' Set the RequireSSL.
httpCookiesSection.RequireSSL = _
False

.NET Framework
Available since 2.0
Return to top
Show: