Reputation: 21
i'm using ACS in my WebApi project
when i try to open any page , i'm redirected to the authetication page (liveId, yahoo or gmail)
i want to disable the authentication for some pages or controllers
is-it possible?
Upvotes: 0
Views: 83
Reputation: 28325
This can be accomplished by using the [AllowAnonymous]
attribute on your methods.
For example:
[Authorize]
public class AccountController : Controller
{
[AllowAnonymous]
public ActionResult Login()
}
You can read more about this attribute in this blog post:
Securing your ASP.NET MVC 4 App and the new AllowAnonymous Attribute
Upvotes: 1