Quantcast
Channel: Active questions tagged blazor - Stack Overflow
Viewing all articles
Browse latest Browse all 4839

Blazor Antiforgery Middleware not Found

$
0
0

I have used Cookies early on but switched to only use Local Storage. This is the reason I would like to remove Antiforgery again, but I am unable to remove this line in Program.cs: app.UseAntiforgery();

I use Blazor .net8 and have started the Project with the Blazor Web App Template using Auto (Server and WebAssembly).

Here are the logs from Serilog. I have set everything to Information.All Pages but the swagger documentation get this error.The Authorization Attribute are disabled because I have implemented it with AccessTokenService but it also does not have a reference to AntiforgeryToken in any way.

Log: https://pastebin.com/9rSAbTEPServer Program.cs: https://pastebin.com/mKz1Ghu8Client Program.cs: https://pastebin.com/MiRCnPZ1

I have tried searching inside the ProjectFolder for anything related to the words forg aswell as the Project Files themself. They found nothing.

I have took a look at all files manually, expecially the ones that are required for the endpoint / like App.razor, Routes.razor, _Imports.razor, Index.razor.

I am guessing something automatically got added to my project when first using the AntiForgeryToken and that has automatically added the check to all my pages.

Tried looking it up everywhere but I think I am the first trying to remove it instead of adding it.


Viewing all articles
Browse latest Browse all 4839

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>