Using Identity 2.0 with a Web Forms project.
I can login successfully, and control access to pages using <allow users="<emailaddress>"/>
, but when I add a user to a role in AspNetUserRoles, it causes the application to return this error:
The specified cast from a materialized 'system.int32' type to the 'system.string' type is not valid
The string of code that Visual Studio references on the crash is:
var user = manager.FindByName(Email.Text)
How can I fix this?