I\'m having issues using the new identity system in MVC 5, my goal is to make use of the User.IsinRole(\"RoleName\") on Views. For example:
@if(User.IsInRole(\"A
I managed to get around the problem by removing the following line from my Web Config:
<roleManager enabled="true" />
This was found when looking after comparing line for line on the following example code:
https://github.com/rustd/AspnetIdentitySample/tree/master/AspnetIdentitySample
I was having the same problem, however Stunt's answer wasn't working for me. Tried the answer to this question and that solved the issue.
For the lazy you can try adding this to your web.config file:
<system.webServer>
<modules>
<remove name="RoleManager" />
</modules>
</system.webServer>
Create database on start up of the application. Add the following in the Global.ascx with your dbcontext.
using (FooContext db = new FooContext())
{
db.Database.CreateIfNotExists();
}