CookieOptions Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Options used to create a new cookie.
public class CookieOptions
type CookieOptions = class
Public Class CookieOptions
- Inheritance
-
CookieOptions
Constructors
CookieOptions() |
Creates a default cookie with a path of '/'. |
Properties
Domain |
Gets or sets the domain to associate the cookie with. |
Expires |
Gets or sets the expiration date and time for the cookie. |
HttpOnly |
Gets or sets a value that indicates whether a cookie is accessible by client-side script. |
Path |
Gets or sets the cookie path. |
SameSite |
Gets or sets a value that indicates on which requests client should or should not send cookie back to the server. Set to null to do not include SameSite attribute at all. |
Secure |
Gets or sets a value that indicates whether to transmit the cookie using Secure Sockets Layer (SSL)—that is, over HTTPS only. |