I have read a number of links to try and help me solve this problem. I am following my first MVC tutorial through on Pluralsight and I am moving on to using authentication. It uses the MVC4 Internet Application Template.
In my Seed
method I have:
protected override void Seed(DepartmentDb context)
{
if (!Roles.RoleExists("Admin"))
Roles.CreateRole("Admin");
if (Membership.GetUser("Luke") == null)
{
Membership.CreateUser("Luke", "password");
Roles.AddUserToRole("Luke", "Admin");
}
}
The user and role add fine in to SQL
and this all seems hunky dory, and is also the same as the tutorial. It then instructs to log in with my credentials. So I try to log in and I get the exception stated in the title:
Membership.Provider must be instance of ExtendedMembershipProvider
I have tried re-installing the packages required and also tried installing it as per a SO post and also adding the SimpleMembership
into appsetings
which doesn't work.
I have also read this MSDN link as per a comment, which I have followed instructions but still can't solve it.
What else do I need to do to get this working? It is driving me insane.
Thanks,
Luke.