How to use ActionFilter once to perform on all controller
I have a situation where I need one Filter to be executed before every api call but in dot net you have to write that filter above every controller.
[ActionFilterName].
I have a situation where I need one Filter to be executed before every api call but in dot net you have to write that filter above every controller.
[ActionFilterName].
I am using latest web api.
I’m trying to create a custom ActionFilter which operates on a set of parameters that would be passed to it from the controller.
I have a pre-action web api hook that will check ModelState.IsValid. If the ModelState is not valid I do not want to execute the action and just return my message immediately. How exactly do I do this?
I want to use G-ZIP on my website, I googled the following code: