1

I am writing a Windows service in ASP.NET Core 5 that hosts web service API's (i.e. controllers).

At the end of the startup sequence, I would like write to the log file a list of all web service API URL's that exist in the service. Is there a way to programmatically find and list all valid web service API's?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Brad
  • 401
  • 4
  • 5
  • By reflection. By scanning all classes whose inherit from `ControllerBase`, then their methods marked with an Http verb attribute, I'd say. – Mario Vernari Jul 09 '21 at 05:02
  • 1
    This Question is already answered [Answer](https://stackoverflow.com/questions/28435734/how-to-get-a-list-of-all-routes-in-asp-net-core) – Matt Qafouri Jul 09 '21 at 06:07

0 Answers0