i see that there are two version of ActionFilterAttribute class.
System.Web.Mvc.ActionFilterAttribute and System.Web.Http.Filters.ActionFilterAttribute
what is different?
Exception Filters − Exception filters are the last type of filter to run. You can use an exception filter to handle errors raised by either your controller actions or controller action results.
The System.Web.Http one is for Web API; the System.Web.Mvc one is for previous MVC versions.
You can see from the source that the Web API version has several differences.
OnResultExecuting
and OnResultExecuted
handlers ("Called by the ASP.NET MVC framework before/after the action result executes.")If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With