SessionOptions SessionOptions SessionOptions Class

Definition

Represents the session state options for the application.

public class SessionOptions
type SessionOptions = class
Public Class SessionOptions
Inheritance
SessionOptionsSessionOptionsSessionOptions

Constructors

SessionOptions() SessionOptions() SessionOptions()

Properties

Cookie Cookie Cookie

Determines the settings used to create the cookie.

Name defaults to CookieName. Path defaults to CookiePath. SameSite defaults to Lax. HttpOnly defaults to trueIsEssential defaults to false

CookieDomain CookieDomain CookieDomain

This property is obsolete and will be removed in a future version. The recommended alternative is on Cookie.

Determines the domain used to create the cookie. Is not provided by default.

CookieHttpOnly CookieHttpOnly CookieHttpOnly

This property is obsolete and will be removed in a future version. The recommended alternative is on Cookie.

Determines if the browser should allow the cookie to be accessed by client-side JavaScript. The default is true, which means the cookie will only be passed to HTTP requests and is not made available to script on the page.

CookieName CookieName CookieName

This property is obsolete and will be removed in a future version. The recommended alternative is on Cookie.

Determines the cookie name used to persist the session ID.

CookiePath CookiePath CookiePath

This property is obsolete and will be removed in a future version. The recommended alternative is on Cookie.

Determines the path used to create the cookie. Defaults to CookiePath.

CookieSecure CookieSecure CookieSecure

This property is obsolete and will be removed in a future version. The recommended alternative is on Cookie.

Determines if the cookie should only be transmitted on HTTPS requests.

IdleTimeout IdleTimeout IdleTimeout

The IdleTimeout indicates how long the session can be idle before its contents are abandoned. Each session access resets the timeout. Note this only applies to the content of the session, not the cookie.

IOTimeout IOTimeout IOTimeout

The maximim amount of time allowed to load a session from the store or to commit it back to the store. Note this may only apply to asynchronous operations. This timeout can be disabled using InfiniteTimeSpan.

Applies to