RequireSSL Property
Collapse the table of content
Expand the table of content

HttpCookiesSection.RequireSSL Property

This property supports the .NET Framework 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)

public bool RequireSSL { get; set; }
/** @property */
public boolean get_RequireSSL ()

/** @property */
public void set_RequireSSL (boolean value)

public function get RequireSSL () : boolean

public function set RequireSSL (value : boolean)

Not applicable.

Property Value

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.
Boolean requireSSLValue = 
    httpCookiesSection.RequireSSL;

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


Windows 98, Windows Server 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0, 2.0

Community Additions

ADD
Show:
© 2016 Microsoft