I have created a user register controller to register users with repository design pattern. My controller looks like this.
[Route(\"api/[controller]\")]
There can be multiple reasons out of which one can be : – Caching in Visual Studio --
1.Close all the instances of visual studios, run Developer command prompt with Admin rights.
2.git clean -xfd [Your Repository to remove all dependencies and existing soln file]
3.take the latest build and run . [Make Endpoint AllowAnonymous]