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.

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top