ASP.NET membership: System.Web.Security. SqlRoleProvider problems
I had this really weird problem just now. I have done some work with the ASP.NET Membership provider and everything has been working great. But when I tried to deploy my application to the server I got this:
The ‘System.Web.Security.SqlRoleProvider’ 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.
Alright, my database was exactly the same and everything looked fine. I tried to recreate my database with the aspnet_regsql.exe tool but nothing worked. Then I finally found this thread on the MSDN messageboard and one guy said that he gave his application a name in the aspnet_Applications table and put that name in the web. config like this.
And that solved it. Really really strange and I have no idea if this is a bug or whatever. On my local machine (Vista with IIS7) it worked great to have an application named “/” but on my production machine (a Server 2003 with IIS6) it did not.
Now I should stop working for today.