RoleManagerSection.CookieName プロパティ

定義

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

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

プロパティ値

ロール名のキャッシュに使用される Cookie の名前。 既定値は ". です。ASPXROLES"。

属性

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

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

注釈

CookieName プロパティは、ロール名のキャッシュに使用される Cookie の名前を返します。 ASP.NET アプリケーションの Web.config ファイルに cookieName 属性を設定することで、アプリケーションのロールがキャッシュされる Cookie の名前を指定できます。 これは、アプリケーションの Cookie を一意に識別する場合や、Cookie が複数のアプリケーション間で共有されている場合に便利です。

適用対象