I went to the Manage NuGet Package option and updated all the packages. I'm not using much: Linq-to-EF
6.1 and the packages needed to make MS Identity
work. However, something broke because now when I go to log in, I get an error
Exception Details: System.Data.SqlClient.SqlException: Invalid column name 'Email'.
Invalid column name 'EmailConfirmed'.
Invalid column name 'PhoneNumber'.
Invalid column name 'PhoneNumberConfirmed'. //and so on
The exception looks like this:
What might have caused this and how do I fix and prevent this from happening again when all I did was just update the NuGet packages?
Thanks.
Edit: I resolved this issue by totally removing the database; the app recreated a new DB with the necessary columns. I was able to do that because the app is still in dev and no real user data was involved. However, I'm still interested in this issue because when new updates will be released, I want to make sure I don't have to throw away the current DB.
I solved this for my application by removing the
DefaultConnection
connection string. If you haveDefaultConnection
andMySpecialConnection
in your config file, ASP.net identity seems to useDefaultConnection
.Sounds like you would need to create your own user object with the additional fields you want that are not provided by the base object. That would then need to match the table in the database.
Then you use that new user object every time you use the usermanager.
Hope that helps