Pregunta

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.

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top