Freigeben über


FormsAuthenticationConfiguration.Domain Eigenschaft

Definition

Dient zum Abrufen oder Festlegen des Domänennamens, der mit Formularauthentifizierungscookies gesendet werden soll.

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

Eigenschaftswert

Der Name der Domäne für die ausgehenden Formularauthentifizierungscookies. Der Standardwert ist eine leere Zeichenfolge.

Attribute

Beispiele

Das folgende Codebeispiel zeigt, wie Sie auf die Domain Eigenschaft zugreifen. Weitere Informationen zum Abrufen des Abschnitts finden Sie im Codebeispiel im FormsAuthenticationConfiguration Klassenthema.

// 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"

Hinweise

Dies Domain wird für die Authentifizierungscookies verwendet.

Diese Eigenschaft entspricht dem Wert von HttpCookie.Domain.

Diese Einstellung hat Vorrang vor dem domain Attribut des forms Abschnitts für Formularauthentifizierungscookies.

Gilt für: