Blazor server-side when refresh results in an AccessDenied error

36 Views Asked by At

I use ASP.NET Core 8 Blazor server app with MVC, my problem is when I refresh my page with an authorize attribute, I get an http 403 error.

If I go back or rewrite the url, everything is fine.

I change default cookie and use JWT, but I still have this bug

1

There are 1 best solutions below

0
Mrbanad On

problem is i have attribute In Root Folder Of My AdminPanel and one in Child Folder for Example Root: @attribute [Authorize(Roles = "Administrator, System")] Child: @attribute [Authorize(Roles = "Branch")]

I just Change my

@attribute [Authorize(Roles = "Branch")]

to

@attribute [Authorize(Roles = "Administrator, System, Branch")]