FormsAuthenticationConfiguration.RequireSSL 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 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

Egenskapsvärde

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

Attribut

Exempel

Följande kodexempel visar hur du kommer åt RequireSSL egenskapen Referera till kodexemplet i klassavsnittet FormsAuthenticationConfiguration för att lära dig hur du hämtar avsnittet.

// Create a new FormsAuthentication object.
FormsAuthenticationConfiguration newformsAuthentication =
new FormsAuthenticationConfiguration();
' Create a new FormsAuthentication object.
Dim newformsAuthentication _
As New FormsAuthenticationConfiguration()

Kommentarer

Om RequireSSL är trueavvisar ett webbprogram alla formulärautentiseringsbegäranden som inte använder en SSL-anslutning.

Gäller för

Se även