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

Last post 03-13-2009 11:26 PM by pargat.randhawa. 4 replies.

Sort Posts:

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

    11-25-2007, 11:18 PM
    • Member
      point Member
    • erick.wyatt
    • Member since 11-26-2007, 4:16 AM
    • Ft Hood, TX
    • Posts 2

    here is the error that I got. can someone please help me

     

    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_regsql.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_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.

    Source Error:

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

    Stack Trace:

    [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_regsql.exe (available in the framework installation directory), or upgrade the provider to a newer version.]
    System.Web.Util.SecUtility.CheckSchemaVersion(ProviderBase provider, SqlConnection connection, String[] features, String version, Int32& schemaVersionCheck) +758235
    System.Web.Security.SqlRoleProvider.CheckSchemaVersion(SqlConnection connection) +65
    System.Web.Security.SqlRoleProvider.GetRolesForUser(String username) +771
    System.Web.Security.RolePrincipal.IsInRole(String role) +272
    System.Web.Configuration.AuthorizationRule.IsTheUserInAnyRole(StringCollection roles, IPrincipal principal) +120
    System.Web.Configuration.AuthorizationRule.IsUserAllowed(IPrincipal user, String verb) +300
    System.Web.Configuration.AuthorizationRuleCollection.IsUserAllowed(IPrincipal user, String verb) +191
    System.Web.Security.UrlAuthorizationModule.IsUserAllowedToPath(HttpContext context, VirtualPath virtualPath) +219
    System.Web.UI.Util.IsUserAllowedToPath(HttpContext context, VirtualPath virtualPath) +101
    System.Web.SiteMapProvider.IsAccessibleToUser(HttpContext context, SiteMapNode node) +367
    System.Web.SiteMapNode.IsAccessibleToUser(HttpContext context) +14
    System.Web.StaticSiteMapProvider.GetChildNodes(SiteMapNode node) +348
    System.Web.SiteMapNode.get_ChildNodes() +23
    System.Web.SiteMapNode.get_HasChildNodes() +4
    System.Web.SiteMapNode.System.Web.UI.IHierarchyData.get_HasChildren() +4
    System.Web.UI.WebControls.Menu.DataBindRecursive(MenuItem node, IHierarchicalEnumerable enumerable) +4225
    System.Web.UI.WebControls.Menu.DataBindItem(MenuItem item) +277
    System.Web.UI.WebControls.Menu.PerformDataBinding() +117
    System.Web.UI.WebControls.HierarchicalDataBoundControl.PerformSelect() +82
    System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
    System.Web.UI.WebControls.Menu.DataBind() +4
    System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
    System.Web.UI.WebControls.Menu.EnsureDataBound() +29
    System.Web.UI.WebControls.Menu.OnPreRender(EventArgs e, Boolean registerScript) +21
    System.Web.UI.WebControls.Menu.OnPreRender(EventArgs e) +22
    System.Web.UI.Control.PreRenderRecursiveInternal() +77
    System.Web.UI.Control.PreRenderRecursiveInternal() +161
    System.Web.UI.Control.PreRenderRecursiveInternal() +161
    System.Web.UI.Control.PreRenderRecursiveInternal() +161
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1360
     

    Erick Wyatt, SGT
    US Army

    http://enjwyatt.com/wyatt/default.aspx
  • Re: The 'System.Web.Security.SqlRoleProvider' requires a database schema compatible with schema version '1'.

    11-26-2007, 8:27 AM
    • Participant
      918 point Participant
    • The Eagle
    • Member since 04-30-2007, 1:06 PM
    • Posts 181

    I just faced the same problem because I scripted my DB and then executed the script on the DB of the production.

    I solved this by backing up my DB and restoring it on the production server

  • Re: The 'System.Web.Security.SqlRoleProvider' requires a database schema compatible with schema version '1'.

    11-26-2007, 8:50 AM
    • Participant
      918 point Participant
    • The Eagle
    • Member since 04-30-2007, 1:06 PM
    • Posts 181
  • Re: The 'System.Web.Security.SqlRoleProvider' requires a database schema compatible with schema version '1'.

    11-27-2007, 1:08 AM
    • Participant
      918 point Participant
    • The Eagle
    • Member since 04-30-2007, 1:06 PM
    • Posts 181

    I just solved my problem which is the same as your problem. I am not sure if this is your case or not:

    There was 2 connection strings, one of them was pointing to the development DB, and the other to testing DB. When I made them pointing to the testing DB, it worked.

    If you still didn't solve your problem, let me know in order to help you.

  • Re: The 'System.Web.Security.SqlRoleProvider' requires a database schema compatible with schema version '1'.

    03-13-2009, 11:26 PM

    Hi,

    I just solved this problem by copying following database tables to production server

    (a) aspnet_Applications

    (b) aspnet_Roles

    (c) aspnet_SchemaVersions

    Good LuckWink

Page 1 of 1 (5 items)