Мне нужно получить контроллер, который запускает атрибут фильтра. < /p> У меня есть следующий фильтр: < /p> [code]public override void OnException(HttpActionExecutedContext filterContext) { if (filterContext == null) { throw new ArgumentNullException("filterContext"); }
HttpResponseMessage msg = new HttpResponseMessage(HttpStatusCode.InternalServerError) { Content = new StringContent("An unhandled exception was thrown by Customer Web API controller."), ReasonPhrase = "An unhandled exception was thrown by Customer Web API controller." };
filterContext.Response = msg;
}
} < /code> В традиционном MVC это было легко, делая: < /p> string controllerName = (string) filterContext.RouteData.Values["controller"]; string actionName = (string) filterContext.RouteData.Values["action"]; [/code] Что я могу попробовать дальше?