Language

RoleManagerSection.CookieTimeout プロパティ

定義

ロール名のキャッシュに使用される Cookie の有効期限が切れるまでの時間 (分) を取得または設定します。

public:
 property TimeSpan CookieTimeout { TimeSpan get(); void set(TimeSpan value); };
[System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanMinutesOrInfiniteConverter))]
[System.Configuration.ConfigurationProperty("cookieTimeout", DefaultValue="00:30:00")]
[System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:00:00")]
public TimeSpan CookieTimeout { get; set; }
[<System.ComponentModel.TypeConverter(typeof(System.Configuration.TimeSpanMinutesOrInfiniteConverter))>]
[<System.Configuration.ConfigurationProperty("cookieTimeout", DefaultValue="00:30:00")>]
[<System.Configuration.TimeSpanValidator(MaxValueString="10675199.02:48:05.4775807", MinValueString="00:00:00")>]
member this.CookieTimeout : TimeSpan with get, set
Public Property CookieTimeout As TimeSpan

プロパティ値

ロール名のキャッシュに使用される Cookie の有効期限が切れるまでの時間 (分) を示す TimeSpan 。 既定値は 30 (分単位) です。

属性

例

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

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

注釈

CookieTimeout プロパティは、ロール名 Cookie の有効期限が切れるまでの時間 (分) を指定する値を設定します。 既定値は 30 分です。 CookieSlidingExpiration プロパティがfalseされている場合、CookieTimeout プロパティは無視されます。

適用対象

こちらもご覧ください