次の方法で共有


FormsAuthenticationConfiguration.Domain プロパティ

定義

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

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

プロパティ値

String

アウトゴーイング フォーム認証クッキーのドメインの名前。 既定値は空の文字列です。

属性

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優先されます。

適用対象