Is it possible to figure out the currently executing controller/action in OnActionExecuting?
You could try the ActionDescriptor of the ActionExecutingContext as follows:
ActionDescriptor
ActionExecutingContext
protected override void OnActionExecuting(ActionExecutingContext filterContext) { string actionName = filterContext.ActionDescriptor.ActionName; string controllerName = filterContext.ActionDescriptor.ControllerDescriptor.ControllerName ..... base.OnActionExecuting(filterContext); }
2.1m questions
2.1m answers
60 comments
57.0k users