編輯

共用方式為


RoleManagerSection.CookieRequireSSL Property

Definition

Gets or sets a value indicating whether the cookie that is used to cache role names requires a Secure Sockets Layer (SSL) connection in order to be returned to the server.

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

Property Value

true if an SSL connection is needed in order to return to the server the cookie where role names are cached; otherwise, false. The default is false.

Attributes

Examples

The following code example demonstrates how to use the CookieRequireSSL property. This code example is part of a larger example provided for the RoleManagerSection class.

// Display CookieRequireSSL property.
Console.WriteLine("CookieRequireSSL: {0}",
  configSection.CookieRequireSSL);
' Display CookieRequireSSL property.
Console.WriteLine("CookieRequireSSL: {0}", _
 configSection.CookieRequireSSL)

Remarks

You can specify whether SSL is required to return the role names cookie to the server by setting the cookieRequireSSL attribute in the Web.config file for your ASP.NET application.

Applies to

See also