dotnet / dotnet/aspnetcore

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

Open
#42,462 2 comments 0 reactions 0 assignees View on GitHub
area-mvc feature-routing
Dominant language
C#
Stars
38.4k
Forks
10.9k
Avg merge
2d 5h
Merged PRs (30d)
276

Description

### Is there an existing issue for this?

- [X] 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](https://user-images.githubusercontent.com/18216790/176092391-70a8b01c-1436-4212-ace9-7362356fd76f.png)

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_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.