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); }
1.4m articles
1.4m replys
5 comments
57.0k users