How to execute Action Filter before Authorization Filter MVC 4

Viewed 7291

I have implemented my own custom Authorization Attribute in MVC 4 by inheriting from AuthorizeAttribute class. I also have a custom ActionFilterAttribute. These both work fine however the problem lies in ordering them. I need the custom Action Filter to run before the custom Authorize Filter.

I have tried using the Order property for the attributes but as i understand it, Authorize Filters will always run before Action Filters.

Does anyone know how to force the Action Filter to execute before the Authorize Filter??

1 Answers
Related