AnonymousIdentificationSection.CookieRequireSSL Egenskap

Definition

Hämtar eller anger ett värde som anger om en SSL-anslutning (Secure Sockets Layer) krävs vid överföring av autentiseringsinformation.

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

Egenskapsvärde

trueom en SSL-anslutning krävs; annars . false Standardvärdet är false.

Attribut

Exempel

Följande kodexempel visar hur du kommer åt egenskapen CookieRequireSSL .

// Get CookieRequireSSL.
bool cookieRequireSSL = 
    anonymousIdentificationSection.CookieRequireSSL;
Console.WriteLine("Cookie require SSL: {0}", 
    cookieRequireSSL.ToString());
' Get CookieRequireSSL.
Dim cookieRequireSSL As Boolean = _
anonymousIdentificationSection.CookieRequireSSL
Console.WriteLine("Cookie require SSL: {0}", _
cookieRequireSSL.ToString())

Kommentarer

Om CookieRequireSSL är truereturnerar inte en kompatibel webbläsare cookien om inte anslutningen är över SSL.

Note

När den anonyma identifieraren lagras i URI-sökvägen, i stället för i en cookie, CookieRequireSSL påverkar inställningen inte beteendet för den anonyma identifieringsmodulen. Detta överensstämmer med beteendet i formulärautentisering.

Gäller för

Se även