The ‘System.Web.Security. SqlMembershipProvider’ requires a database schema compatible with schema version ‘1’

I had a situation recently where I’ve added ASP.Net membership to a development database as part of requirements for a new project. After implementation was finished and tested in development environment, I used Red Gate’s SQL Compare to update test database with ASP.Net membership objects (since I had some other database changes that I wanted to deploy at the same time). After finishing test deployment, I tried to create a new user, and got a message – The ‘System.Web.Security.SqlMembershipProvider’ requires a database schema compatible with schema version ‘1’.

The problem was that, whilst ASP.Net membership schema and object were created, aspnet_SchemaVersions table was not populated. So I copied data from this table that was in development database to test database, and the problem was solved (I did have to restart IIS on test server as well). So If you are creating ASP.Net membership object via comparison tool (instead of using asp_regsql), make sure to populate aspnet_SchemaVersions table as well.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s