Actionfilterattribute Global Filter. Also you want to make sure that you authorize before you do any of the real work in the action method otherwise the only difference between logged in and not will be what. Global action filters are applied to all actions in web application.
Inherited from filterattribute order. Global action filters are applied to all actions in web application. I m a big fan of using actionfilterattribute to apply a global filter on every single asp net mvc request.
You can not add authorizeattribute into mvcoptions filters.
In this hands on lab you will create a custom action filter attribute into mvcmusicstore solution to catch controller s requests and log the activity of a site into a database table. They run only when the action method has executed successfully. Gets or sets a value that indicates whether more than one instance of the filter attribute can be specified. It sounds like you want to re implement or possibly extend authorizeattribute if so you should make sure that you inherit that and not actionfilterattribute in order to let asp net mvc do more of the work for you.