FormsAuthenticationConfiguration.Domain プロパティ

定義

フォーム認証 Cookie で送信されるドメイン名を取得または設定します。

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

プロパティ値

送信フォーム認証 Cookie のドメインの名前。 既定値は空の文字列です。

属性

次のコード例は、 Domain プロパティにアクセスする方法を示しています。 セクションを取得する方法については、 FormsAuthenticationConfiguration クラスのトピックのコード例を参照してください。

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

注釈

Domainは認証 Cookie に使用されます。

このプロパティは、 HttpCookie.Domainの値に対応します。

この設定は、フォーム認証 Cookie の forms セクションのdomain属性よりも優先されます。

適用対象