Breaking my head around with this, yesterday it worked fine and today it seems to be broken:
This line is generating the error:
@if (Roles.IsUserInRo
For my use case, adding the following line in the web.config file fixed it!
<appSettings>
<add key="enableSimpleMembership" value="false"/>
</appSettings>
Adding this:
[InitializeSimpleMembership]
To the top of the HomeController fixes the issue.
Explanation on the attribute:
http://blogs.msdn.com/b/rickandy/archive/2012/08/15/initializesimplemembership-attribute-and-simplemembership-exceptions.aspx
I found that using UserManager.IsInRole(User.Identity.GetUserId(), "Admin") solved the problem for me. Cheers