Share via


FormsAuthenticationConfiguration.Path プロパティ

定義

クッキーのパスを取得または設定します。

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 クッキーのパス。 既定値はスラッシュ (/) です。これは 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 自体と共に送信されます。

適用対象

こちらもご覧ください