CookieTempDataProviderOptions.Cookie Property


Determines the settings used to create the cookie in CookieTempDataProvider.

 property Microsoft::AspNetCore::Http::CookieBuilder ^ Cookie { Microsoft::AspNetCore::Http::CookieBuilder ^ get(); void set(Microsoft::AspNetCore::Http::CookieBuilder ^ value); };
public Microsoft.AspNetCore.Http.CookieBuilder Cookie { get; set; }
member this.Cookie : Microsoft.AspNetCore.Http.CookieBuilder with get, set
Public Property Cookie As CookieBuilder

Property Value



  • SameSite defaults to Lax. Setting this to Strict may cause browsers to not send back the cookie to the server in an OAuth login flow.
  • SecurePolicy defaults to SameAsRequest.
  • HttpOnly defaults to true.
  • IsEssential defaults to false. This property is only considered when a user opts into the CookiePolicyMiddleware. If you are using the CookiePolicyMiddleware middleware together with CookieTempDataProvider, then either set this property to true or request user consent for non-essential cookies.

Applies to