dotnet / aspnetcore

ASP.NET Core is a cross-platform .NET framework for building modern cloud-based web applications on Windows, Mac, or Linux.

Home Page:https://asp.net

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

API stop working in ASP core 6 after adding new ConsumesAttribute("application/json") angular project

tnlthanzeel opened this issue · comments

Is there an existing issue for this?

  • I have searched the existing issues

Describe the bug

i migrated a project to asp core 6. the project is an API project where it serves angular as front end. after the migration the APIs stopped working for one single line of code

image

so if i comment this line of code and re-run the project the API works. i have no idea

here is the link to the minimal repro - https://github.com/tnlthanzeel/VPMS-POC

Expected Behavior

APi should work as normal

Steps To Reproduce

No response

Exceptions (if any)

No response

.NET Version

asp core 6

Anything else?

No response

@tnlthanzeel thanks for contacting us.

This is likely a dupe of #41060 or caused by the same reason.

I found that if i comment the app.MapFallBackToFile() in the Program.cs then the Api works. But i have no idea why @javiercn