Unable to find endpoints. Invalid URI
I have this code on my controller
In other projects
https://localhost:<PORT>/api/Admin/...
would return the data. But now the URI is invalid.
As it is a .NET 8 project, I am unsure as to how to add swagger as well2 Replies
Do your actions (methods in controller that are supposed to be endpoints) have their own routing too?
If not, change line
To Then the routes will default to action naming e.g: Create() will be accessible under api/admin/create unless you overwrite it
To Then the routes will default to action naming e.g: Create() will be accessible under api/admin/create unless you overwrite it
These are my endpoints
This worked in .NET 7
Fixed, needed .AddControllers and .MapControllers in my Program.cs