How can I get action name?
I replaced the ASP.NET ControllerFactory by a WindsorControllerFactory.
And I registered all controllers and interceptors. Until here everything working well.
Now when I am debuging my Interceptor I always get Execute from ControllerBase in invocation.Method.Name. I need to get the action name and the parameters of the action to do some validations.
开发者_StackOverflow中文版How can I get the action name and the action parameters in the Intercept method of my Interceptor? The information of ControllerBase_Execute method and his parameters don't help me.
Thanks,
Raphael Molesim
I believe you can get that from the RequestContext.RouteData collection. I think the keys for the method/action is "action". Something like:
requestContext.RouteData.Values["action"]
精彩评论