RoleManagerSection.CookiePath プロパティ

定義

ロール名のキャッシュに使用される Cookie の仮想パスを取得または設定します。

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

プロパティ値

ロール名の格納に使用される Cookie のパス。 既定値は "/" です。

属性

次のコード例は、 CookiePath プロパティの使用方法を示しています。 このコード例は、 RoleManagerSection クラスに提供されるより大きな例の一部です。

// Display CookiePath property.
Console.WriteLine("CookiePath: {0}", configSection.CookiePath);
' Display CookiePath property.
Console.WriteLine("CookiePath: {0}", configSection.CookiePath)

注釈

ASP.NET アプリケーションの Web.config ファイルに cookiePath 属性を設定することで、アプリケーションのロール名がキャッシュされる Cookie のパスを指定できます。 CookiePath プロパティは、Web.config ファイルからcookiePath属性の値を返します。 パスでは大文字と小文字が区別されます。

適用対象