I have an ASP.NET Core 5 Web API where routes are not matched. It works fine locally, but it's not working on the server. The logs show me
No candidates found for the request path
but I see the request path and it is correct.
I would like to log all the routes, just to see what my application thinks are the routes. It may help to see what is different on the server.
I would suggest using
Swagger. It is a very common tool that lists all of the API controllers, endpoints and models. Setting it up for .Net 5 is well documented in Microsoft's sources: https://learn.microsoft.com/en-us/aspnet/core/tutorials/web-api-help-pages-using-swagger?view=aspnetcore-5.0#swagger-ui