Partager via


FormsAuthenticationConfiguration.Domain Propriété

Définition

Obtient ou définit le nom de domaine à envoyer avec les cookies d'authentification par formulaire.

public:
 property System::String ^ Domain { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("domain", DefaultValue="")]
public string Domain { get; set; }
[<System.Configuration.ConfigurationProperty("domain", DefaultValue="")>]
member this.Domain : string with get, set
Public Property Domain As String

Valeur de propriété

Nom du domaine pour les cookies d'authentification par formulaire sortants. La valeur par défaut est une chaîne vide.

Attributs

Exemples

L'exemple de code suivant illustre l'accès à la propriété Domain. Reportez-vous à l’exemple de code dans la FormsAuthenticationConfiguration rubrique de classe pour savoir comment obtenir la section .

// Get the current Domain.
string currentDomain = 
    formsAuthentication.Domain;

// Set the current Domain
formsAuthentication.Domain = "newDomain";
' Get the current Domain.
Dim currentDomain As String = formsAuthentication.Domain

' Set the current Domain
formsAuthentication.Domain = "newDomain"

Remarques

est Domain utilisé pour les cookies d’authentification.

Cette propriété correspond à la valeur de HttpCookie.Domain.

Ce paramètre est prioritaire sur l’attribut de la domain section pour les forms cookies d’authentification par formulaire.

S’applique à