You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I add an explicit call to app.UseRouting() in a Blazor Web App, I get the following exception:
"Endpoint / (/) contains anti-forgery metadata, but a middleware was not found that supports anti-forgery."
Repro steps:
Create a Blazor Web App
Update Program.cs to call app.UseRouting() explicitly:
app.UseRouting();app.MapRazorComponents<App>();
Run the app
Expected result: App runs without error
Actual result: Exception saying that the antiforgery middleware is required
Workaround: Adding the antiforgery middleware resolves the issue