ASP.NET Identity 2.1 change PK to int error
I have changed the PK as described in http://www.asp.net/identity/overview/extensibility/change-primary-key-for-users-in-aspnet-identity, however after I try to login, i get the following error. The login part is successful because “this” contains all the approperate data, however creating identity seems to fail
The specified cast from a materialized ‘System.String’ type to the ‘System.Int32’ type is not valid.
at the line
of the method
I had the same problem as well.. the only difference is that my error is during
The offending line is at:
As it turns out, I need to change the key for table