In the FilterConfig class in your web project, add the following line to the RegisterGlobalFilters method. This will cause the attribute's OnActionExecuting method to fire on each server request to an MVC controller (but not a Web API controller).