FormsAuthenticationConfiguration.Domain プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
フォーム認証 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属性よりも優先されます。