FormsAuthenticationConfiguration.Path プロパティ

定義

Cookie パスを取得または設定します。

public:
 property System::String ^ Path { System::String ^ get(); void set(System::String ^ value); };
[System.Configuration.ConfigurationProperty("path", DefaultValue="/")]
[System.Configuration.StringValidator(MinLength=1)]
public string Path { get; set; }
[<System.Configuration.ConfigurationProperty("path", DefaultValue="/")>]
[<System.Configuration.StringValidator(MinLength=1)>]
member this.Path : string with get, set
Public Property Path As String

プロパティ値

認証に使用する HTTP Cookie のパス。 既定値は、Web アプリケーション ルートを表すスラッシュ (/) です。

属性

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

// Get the current Path.
string currentPath = formsAuthentication.Path;
// Set the Path property.
formsAuthentication.Path = "newPath";
' Get the current Path.
Dim currentPath As String = formsAuthentication.Path
' Set the Path property.
formsAuthentication.Path = "newPath"

注釈

Path プロパティは、認証 Cookie が存在し、認証 Cookie 自体と共に送信される場所を示します。

適用対象

こちらもご覧ください