Property MaxPersistentSessionLifetime
MaxPersistentSessionLifetime
Gets or sets the maximum amount of time after sign-in that a persistent session remains valid, no matter how recently it was refreshed, or null for no limit. Default is null.
Declaration
public TimeSpan? MaxPersistentSessionLifetime { get; set; }
Property Value
| Type | Description |
|---|---|
| TimeSpan? |
Remarks
The limit is measured from the session's creation time (see CreatedUtc). Like PersistentSessionExpiry, it is enforced when the session is validated against the session store, which happens when the session cookie is due for a refresh or the request forces validation.
The validity period given to a session at sign-in and on each refresh never extends past the limit, so the session cookie is due for validation when the limit is reached, and it expires then rather than a full expiry period later.
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException | The value is zero or negative. |