George Mauer
George Mauer

Reputation: 122112

How to nullify a global Authorize attribute for a specific action

I have a global AuthorizeAttribute which is applied throughout my app to check authorization

I have a single controller however which shouldn't be authorized when built in debug mode (it contains my jasmine unit tests).

How do I tell Asp.Net Mvc to not use authorization for just this one controller?

Upvotes: 0

Views: 86

Answers (1)

Dave Alperovich
Dave Alperovich

Reputation: 32500

have you tried [AllowAnonymous] attribute

   [AllowAnonymous]
   public ActionResult LogIn () {
   }

Upvotes: 4

Related Questions