locked
Any Clue on the System.Web.Security.SqlRoleProvider RRS feed

  • Question

  • User-2082091646 posted
    Hello Everyone
    I have finally succeeded everything in the PWS but I am getting this error I searched so many forums but couldnt able to get one solution. Please help me
    Here is the error


    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.

    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

    Exception Details: System.Configuration.Provider.ProviderException: 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.

    Source Error:

    Line 5:  	Sub Application_Start(ByVal sender As [Object], ByVal e As EventArgs)
    Line 6:  		AddHandler SiteMap.SiteMapResolve, AddressOf Me.AppendQueryString
    Line 7:          If (Roles.RoleExists("Administrators") = False) Then
    Line 8:              Roles.CreateRole("Administrators")
    Line 9:          End If
    Friday, August 19, 2005 12:56 AM

All replies

  • User-35637376 posted
    Hi there,

    I got the same error when I was playing with the Club Wet Site starter kit. I found a workaround as follows, first make sure that you add all the options from aspnet_regsql.exe related to the application services. For example, aspnet_regsql -S (local) -A rmp -E  After this, you should have all the roles and members related tables. Secondly, I happened to add an application settings first then other security for roles and members etc started working as well. I just added a dummy setting in the Application tab and saved.

    Hope this helps. Good luck!
    Tuesday, August 30, 2005 1:25 PM
  • User1653213183 posted

    I had the exact same issue after moving from dev to qa. I had successfully run aspnet_regsql.exe against QA without error and it created all the pieces it was supposed to, but I still had the error.

    I ran my dev code against the QA DB and I had no issue, but runing the code from the QA server caused the error (same bins!)

    As soon as I added a role (which also added my application), the problem disappeared. I added the role via code, but you can use the stored procedure to do it also. (aspnet_Roles_CreateRole).

    Hope this helps someone.

    Thursday, March 29, 2007 5:11 PM