ASP.NET SqlMembershipProvider schema version error
Wednesday, March 19th, 2008Autor: ricardo.fiel
While migrating a database from SQL Server 2005 to SQL Server 2000, a colleague was faced with this exception:
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_reqsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.
He didn’t use aspnet_regsql on the target db. Instead, he generated schema create scripts from SQL Server Management Studio. I usually use RedGate SQL Compare and SQL Data Compare, which I believe to be priceless for database synchronization.
There are many probable causes for this. After browsing for solutions, here’s a summary of steps we took to solve it:
- If possible, use aspnet_regsql on the target db.
- Make sure the user specified in the connection string has EXECUTE permissions on aspnet_* stored procedures. Grant them if necessary.
- Restart the web application
Don’t forget step 3!