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

Error: The 'System.Web.Security.SqlMembershipProvider' requires a database schema compatible with schema version '1'

I received above error on my production machine after deploying new database for a web application. I have SQL Server 2008 R2 installed and to deploy database I created query file (.sql) schema with data. After that I deployed web application properly.

When tried to browse the application locally on production machine I noticed following error:

When I noticed this issue, every other web applications using exact same framework as well as settings was working smoothly. Even I double checked web application access permission on database, connection string etc everything was correct.

How to resolve?

I resolved this issue very interestingly, which is truly amazed me.

The trick was going through the IIS and took application offline and then removed the web.config (with backup) then took IIS web app online. Obviously no web.config so I see another error then recopied the backup web.config. That’s it.

And I was able to see my web app working correctly.


Popular posts from this blog

Migrating database from ASP.NET Identity to ASP.NET Core Identity