Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
When we add CookiePolicyOptions option to Startup.cs, we can't access the back office UI.
We see the following error in JS Console.
Failed to load resource: the server responded with a status of 417 (The required antiforgery header value "X-UMB-XSRF-TOKEN" is not present.)
If we remove the CookiePolicyOptions then we can access the back office UI.
Can someone please guide me to fix this issue?
Best regards, Yogesh
public void ConfigureServices(IServiceCollection services) {
services.AddDistributedMemoryCache(); **services.Configure<CookiePolicyOptions>(options => { options.CheckConsentNeeded = context => true; options.MinimumSameSitePolicy = SameSiteMode.Strict; });** services.AddControllersWithViews() .AddSessionStateTempDataProvider(); services.AddRazorPages() .AddSessionStateTempDataProvider(); services.AddSession(); services.AddUmbraco(_env, _config) .AddBackOffice() .AddWebsite() .AddComposers() .Build();
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Adding CookiePolicyOptions to projects breaks the back office UI
When we add CookiePolicyOptions option to Startup.cs, we can't access the back office UI.
We see the following error in JS Console.
Failed to load resource: the server responded with a status of 417 (The required antiforgery header value "X-UMB-XSRF-TOKEN" is not present.)
If we remove the CookiePolicyOptions then we can access the back office UI.
Can someone please guide me to fix this issue?
Best regards, Yogesh
pragma warning disable IDE0022 // Use expression body for methods
is working on a reply...