I have a controller and actions that are responsible for handling 403s due to the fact that users are not in the right roles. It has access to the original RequestContext
that caused the exception.
What I would like to do is to decorate my actions with a description of what they are doing, and then let the user notify their manager by requesting access, including a description in the email.
So, how can I determine which action will be called using RequestContext
?
Obviously, this is more complicated, because getting the controller names and actions from RouteData
, as often overloads of the action method, etc.
Once I have MethodInfo
, then it's easy to get attributes, etc.
source share