How to fix "incompatible schema version" error when deploying ASP.net application into a shared webhost
I was having the following error in my MS MVC application hosted in Mocha webhost:
The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'. However, the current database schema is not compatible with this version. You may need to either install a compatible schema with aspnet_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.
My Problem was that even tho I already had created the database that contains the schema generated by aspnet_regsql.exe and I already edited my web.config to point the provider string to that database, the data was not there in the new database. To fix the problem I copied and pasted (using Management Studio) the data from the following tables from my working SQL Express 2008 development database to my production database at Mocha:
- SchemaVersions (the most important one to fix the "wrong schema" version)
- Applications
- Users
- Roles
- UsersInRoles
- Roles
- Membership
Comments