user1622589
user1622589

Reputation: 21

Disable ACS Web Api Project

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

Answers (1)

Magnus Johansson
Magnus Johansson

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

Related Questions