RoleManagerSection.CookieName プロパティ
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
ロール名のキャッシュに使用される 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 が複数のアプリケーション間で共有されている場合に便利です。