Area-global filters in MVC 3

Since it does not seem to be supported initially, what is the recommended way to implement global filters for each area?

+6
source share
2 answers

You can use custom IFilterProvider .

+2
source

The reason it is not supported initially is because we want to discourage developers from doing this. Regions are not associated with controllers; they are associated with routes. We wanted to deny developers an attempt to apply authorization or other security-sensitive filters for areas, since they can be circumvented.

See How to configure authorization for an entire area in ASP.NET MVC? for more information.

+9
source

Source: https://habr.com/ru/post/886124/


All Articles