Feel free to close this one if it s a duplicate. I couldn't find an answer.
I wish to be able to place a System.Web.ActionFilterAttribute
on an Action Method and override the OnActionExecuting
method to insert business logic which determines if the Action should be fulfilled.
Can the ActionExecutingContext
be used to cancel the executing Action Method and do one of the following:
- Send an HTTP Status Code (and the corresponding
<customError>
page). - Execute a different Action Method within the same Controller.