ASP.Net Web Api - ApiExplorer does not contain any ApiDescriptions
问题 I am trying to implement an Options method in a controller of my web service that will return a message containing the valid HTTP methods for the URI endpoint associated with the controller. My Options method looks something like this: public HttpResponseMessage Options() { var resp = new HttpResponseMessage(); resp.Content = new StringContent(""); var apiExplorer = GlobalConfiguration.Configuration.Services .GetApiExplorer(); foreach (ApiDescription api in apiExplorer.ApiDescriptions) { resp