I am looking to add page by page security/authentication for a website. All users are logged in via Active Directory. This is a MVC application. I tried adding
[Authorize(Roles = @"Doamin\Group")]
public ActionResult Index()
{
return View();
}
Is this the right way to do this? are there any other options/ways to do this.
Thanks for the information.
Configure WindowsTokenRoleProvider, Then you can use:
But you may encounter some “security” restrictions when querying the provider programatically. If so then switch to a custom AD role provider. One example would be this but there are sure to be more out there.