Friday, January 13, 2017

ASP.NET Core MVC–Register a global authorization filter

ASP.NET Core MVC still supports the concept of action filters. On the project I’m currently working on I wanted to add a global Authorization filter.

So similar to ASP.NET MVC, I tried to add the AuthorizeAttribute as a global filter:

However this didn’t work. In ASP.NET Core MVC the Attribute class and the filter implementation are separated from each other. Instead I had to use the following code:


Macrosoft said...

Good explain about core mvc.

Convert ASP to ASP.Net

supriya seth said...

Thanks for sharing this article you have a good command on I will follow up this blog for the future posts.
Best DOT NET Online Training in Hyderabad, India