SQL Schema Version Error

Jan 10, 2009 at 2:47 PM
Edited Jan 10, 2009 at 2:49 PM

When i run this project then it throws an exception shoing below

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.

I am using sql server express 2005 edition.

How can I fix this bug.

Jan 20, 2009 at 7:41 AM

I have seen this error message when the asp.net membership database was not installed correctly. 

To install the database use aspnet_regsql from the command line. I do not know if there are any special requirements when using the Express Edition.

More information can be found here: http://msdn.microsoft.com/en-us/library/ms229862(VS.80).aspx

Jan 21, 2009 at 8:37 AM

Also, the table aspnet_SchemaVersions should contain the following data. It's possible that this table is empty.

Feature CompatibleSchemaVersion IsCurrentVersion

common    1    True

health monitoring    1    True
membership    1    True
personalization    1    True
profile    1    True

role manager    1    True

Executing the following sql statements inserts the correct values

INSERT INTO aspnet_SchemaVersions (Feature, CompatibleSchemaVersion, IsCurrentVersion)
VALUES('common', 1, 1) 
INSERT INTO aspnet_SchemaVersions (Feature, CompatibleSchemaVersion, IsCurrentVersion)
VALUES('health monitoring', 1, 1) 
INSERT INTO aspnet_SchemaVersions (Feature, CompatibleSchemaVersion, IsCurrentVersion)
VALUES('membership', 1, 1) 
INSERT INTO aspnet_SchemaVersions (Feature, CompatibleSchemaVersion, IsCurrentVersion)
VALUES('personalization', 1, 1) 
INSERT INTO aspnet_SchemaVersions (Feature, CompatibleSchemaVersion, IsCurrentVersion)
VALUES('profile', 1, 1) 
INSERT INTO aspnet_SchemaVersions (Feature, CompatibleSchemaVersion, IsCurrentVersion)
VALUES('role manager', 1, 1)

Hopefully this solves the problem.