RoleManagerSection.CreatePersistentCookie プロパティ

定義

セッション ベースの Cookie または永続的な Cookie を使用してロール名をキャッシュするかどうかを示します。

public:
 property bool CreatePersistentCookie { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("createPersistentCookie", DefaultValue=false)]
public bool CreatePersistentCookie { get; set; }
[<System.Configuration.ConfigurationProperty("createPersistentCookie", DefaultValue=false)>]
member this.CreatePersistentCookie : bool with get, set
Public Property CreatePersistentCookie As Boolean

プロパティ値

true ブラウザー セッション間でロール名 Cookie を永続的にする場合。それ以外の場合は false。 既定値は、false です。

属性

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

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

注釈

CreatePersistentCookie プロパティは、ロール名のキャッシュに使用される Cookie がセッション ベースの Cookie である必要があるかどうかを示します。つまり、ブラウザーが閉じられたときに Cookie が失われるか、永続的な Cookie であるかが示されます。つまり、Cookie はブラウザー セッション間で使用できます。 既定値は false です。これは、セッション ベースの Cookie を使用してロール名をキャッシュすることを示します。

適用対象