Partager via


FormsAuthenticationConfiguration.RequireSSL Propriété

Définition

Obtient ou définit une valeur qui indique si une connexion SSL (Secure Sockets Layer) est requise lors de la transmission d'informations d'identification.

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

Valeur de propriété

true si une connexion SSL est requise ; sinon false. La valeur par défaut est false.

Attributs

Exemples

L’exemple de code suivant montre comment accéder à la RequireSSL propriété Reportez-vous à l’exemple de code dans la FormsAuthenticationConfiguration rubrique de classe pour savoir comment obtenir la section .

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

Remarques

Si RequireSSL a la valeur true, une application web rejette toutes les demandes d’authentification par formulaire qui n’utilisent pas de connexion SSL.

S’applique à

Voir aussi