Hi,
I'm following Pluralsights MVC4 Essentials course. In the video about authorization it enables the DefaultRoleProvider in the Web.config (which
wasn't present altough I created the project with the same MVC4 Internet template. After installing the Universal Providers via nuget, I followed the tutorial and changed the Seed() method
to generate a user and assigning a role.
if (!Roles.RoleExists("Admin"))
{
Roles.CreateRole("Admin");
}
if (Membership.GetUser("sallen") == null)
{
Membership.CreateUser("sallen", "password");
Roles.AddUserToRole("sallen", "admin");
}
Starting the ap ...
Go to the complete details ...