Monthly Archive: June 2023

System.Data.SqlClient.SqlException: Invalid column name ‘IsApproved’, ‘IsLockedOut’, ‘Comment’, ‘CreationDate’, ‘LastLoginDate’, ‘LastLockoutDate’

Got this SqlException again moving a database from a client’s production environment into development. Thought I’d write a short note on resolving it. Check the migration history table: It is likely that the initial create of the tables used Microsoft.AspNet.Identity.EntityFramework.IdentityUser instead of the expected EPiServer.Cms.UI.AspNetIdentity.ApplicationUser. The ContextKey column would contain EPiServer.Cms.UI.AspNetIdentity.ApplicationDbContext`1 rather than EPiServer.Cms.UI.AspNetIdentity.ApplicationDbContext`1 . This may be resolved by removing the tables dbo.__MigrationHistory …