FormsAuthenticationConfiguration.Domain プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
フォーム認証クッキーで送信されるドメイン名を取得または設定します。
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
プロパティ値
アウトゴーイング フォーム認証クッキーのドメインの名前。 既定値は空の文字列です。
- 属性
例
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
優先されます。