MVC Controller POST methods in Blazor Server App returns 405 Method Not Allowed response when running the app via Aspire. #7107
Labels
needs-author-action
An issue or pull request that requires more info or actions from the author.
Is there an existing issue for this?
Describe the bug
I have a POST method Identity/Login in an MVC controller which when called when the project is running via Aspire it returns a 405. However, if I run the project without Aspire then the POST method gets called correctly.
POST method in IdentityController.cs
Form that calls the action in View/Identity/Login.cshtml:
<form method="post">
I have tried
app.UseCors("AllowAll");
but this did not change anything.Here is the program.cs file, if there is anything I have done wrong here
Expected Behavior
I would expect the POST method to be called correctly, as it does without running with Aspire.
Steps To Reproduce
Exceptions (if any)
405 Method not allowed.
.NET Version info
.NET 9
Anything else?
No response
The text was updated successfully, but these errors were encountered: