Yeah you can do that by simply removing Authorize attribute from whole controller class and rather have Authorize attribute on individuals actions wherever you want.
Accessing One action publicly after having custom authorization on controller?
-
30-03-2022 - |
Question
I am using MVC 3 and having custom authorization attribute inhering AuthorizeAttribute on my controller. However in one case, I want to access one action from this controller without any authentication on it. Is it possible?
I want to do it wihout making any changes in the controller file as that code is already in production. Is there any way to override from web config.
La solution
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow