SessionOptions Class¶
Represents the session state options for the application.
- Namespace
Microsoft.AspNetCore.Builder
- Assemblies
- Microsoft.AspNetCore.Session
Properties¶
-
Microsoft.AspNetCore.Builder.SessionOptions.
CookieDomain
¶ Determines the domain used to create the cookie. Is not provided by default.
Return type: System.String public string CookieDomain { get; set; }
-
Microsoft.AspNetCore.Builder.SessionOptions.
CookieHttpOnly
¶ 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.
Return type: System.Boolean public bool CookieHttpOnly { get; set; }
-
Microsoft.AspNetCore.Builder.SessionOptions.
CookieName
¶ Determines the cookie name used to persist the session ID. Defaults to
Microsoft.AspNetCore.Session.SessionDefaults.CookieName
.Return type: System.String public string CookieName { get; set; }
-
Microsoft.AspNetCore.Builder.SessionOptions.
CookiePath
¶ Determines the path used to create the cookie. Defaults to
Microsoft.AspNetCore.Session.SessionDefaults.CookiePath
.Return type: System.String public string CookiePath { get; set; }
-
Microsoft.AspNetCore.Builder.SessionOptions.
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.
Return type: System.TimeSpan public TimeSpan IdleTimeout { get; set; }
-