Questions tagged [asp.net-core-2.1]

Please utilize this tag when asking about ASP.NET Core 2.1 topics, along with the 'ASP.NET Core' tag.

Receiving Json data from ASP.NET CORE 2.1 using JsonResult

Code snippet for a ASP.NET Core 2.0 controller: [Produces("application/json")] [Route("api/[controller]")] [ApiController] public class GraficResourcesApiController : ControllerBase { private readonly ApplicationDbContext _context; public Gra ...

Getting a 404 response for incorrect API URLs in ASP.NET Core and single-page applications

In order to properly handle incorrect API calls on the client side with Angular 5, I need to ensure that a 404 error is returned. Currently, the backend is returning a status code of 200 along with index.html, resulting in a JSON parse error on the fronten ...