Everything was working just fine
Just in case anyone else stumbles upon this that was doing a database first implementation like me.
I made a change by extending the ApplicationUser
class, adding a new field to the AspNetUsers
table, and then had this error on startup.
I was able to resolve this by deleting the record created in the __MigrationHistory
table (there was only one record there) I assume EF decided that I needed to update my database using the migration tool - but I had already done this manually myself.
Deleting Rows in [__MigrationHistory] table with Older productVersion worked for me. This answer is for those who don't want to delete entire [__MigrationHistory] table. Just delete the rows with older version in ProductVersion Column. Hope it helps some one!
Below was the similar kind of error i encountered
The model backing the 'PsnlContext' context has changed since the database was created. Consider using Code First Migrations to update the database (http://go.microsoft.com/fwlink/?LinkId=238269).
I added the below section in the Application Start event of the Global.asax to solve the error
Database.SetInitializer (null);
This fixed the issue
If you delete the "[__MigrationHistory]" table from your "database > System Tables" then it will work.
I just solved a similar problem by deleting all files in the website folder and then republished it.
Delete existing db ,create new db with same name , copy all data...it will work