I am new to .NET Core. I want to get a list of all registered routes in ASP.NET Core. In ASP.NET MVC we had route table in System.Web.Routing
, is there something equivalent in ASP.NET Core? I want to get the routes list in my Controller Action.
C# – Get all registered routes in ASP.NET Core
asp.net-corec
Related Topic
- C# – How to get the client’s IP address in ASP.NET MVC
- Scala: list.flatten: no implicit argument matching parameter type (Any) = > Iterable[Any] was found
- C# – Resolving instances with ASP.NET Core DI from within ConfigureServices
- C# – Could not find a part of the path … bin\roslyn\csc.exe
- C++ – CreateProcess, process do not terminate when redirecting std out/in/err
- R – Custom click tracking for adsense
- C# – ASP.NET Core return JSON with status code
Best Answer
I've created the NuGet package "AspNetCore.RouteAnalyzer" that provides a feature to get all route information.
Try it if you'd like.
Usage
Package Manager Console
Startup.cs
Browse
Run project and you can access the url
/routes
to view all route information of your project.