IIRC

(If you have Sql Express installed on your dev machine)

in The vs menue goto
Project -> ASsp.net settings -> Security -> Enable Role Manager

Ref:
http://msdn.microsoft.com/en-us/library/ms228053.aspx
http://www.asp.net/web-forms/tutorials/security/roles/creating-and-managing-roles-vb





On 16 November 2012 18:45, Stephen Price <[email protected]> wrote:

> Hey all,
>
> I'm asking this here so that I will find the answer in about five minutes
> after asking. :)
>
> I've been following a Pluralsight tutorial on MVC4 and when I add the
> following to my Seed method (for updating the database via
> migration/package manager) I get an error.
>
> if (!Roles.RoleExists("Admin"))
> {
>     Roles.CreateRole("Admin");
> }
>
> The Role Manager feature has not been enabled.
>
> I tried it in my converted MVC4 (.Net 4.0 converted to .Net 4.5) solution
> as well as a brand new blank MVC4 .Net 4.5 solution with same result.
>
> I imagine I have to turn something on somewhere but the course doesn't
> mention it.
>
> anyone hit that before?
> cheers,
> Stephen
>

Reply via email to