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

  • Question

  • User376814817 posted

    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
     

    Sunday, November 25, 2007 11:18 PM

All replies

  • User1548900558 posted

    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

    Monday, November 26, 2007 8:27 AM
  • User1548900558 posted

    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.

    Tuesday, November 27, 2007 1:08 AM
  • User-1041700022 posted

    Hi,

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

    (a) aspnet_Applications

    (b) aspnet_Roles

    (c) aspnet_SchemaVersions

    Good Luck[;)]

    Friday, March 13, 2009 11:26 PM
  • User-1502107371 posted

    I encountered this as well after using a script to clear my database. If you are using godaddy, you can reinstall the ASP.NET Schema using the hosting manager. You can also restore the db if you have a working backup.

    the aspnet_ShemaVersions table should have these values


    Feature CompatibleSchemaVersion IsCurrentVersion
    <input style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" mce_style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/edit.gif" mce_src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/edit.gif" title="Edit" id="ResultsGrid_ctl03_EditButton" name="ResultsGrid$ctl03$EditButton" type="image"> <input style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" mce_style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/drop.gif" mce_src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/drop.gif" title="Delete" id="ResultsGrid_ctl03_DeleteButton" name="ResultsGrid$ctl03$DeleteButton" type="image"> common 1 1
    <input style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" mce_style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/edit.gif" mce_src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/edit.gif" title="Edit" id="ResultsGrid_ctl04_EditButton" name="ResultsGrid$ctl04$EditButton" type="image"> <input style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" mce_style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/drop.gif" mce_src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/drop.gif" title="Delete" id="ResultsGrid_ctl04_DeleteButton" name="ResultsGrid$ctl04$DeleteButton" type="image"> health monitoring 1 1
    <input style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" mce_style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/edit.gif" mce_src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/edit.gif" title="Edit" id="ResultsGrid_ctl05_EditButton" name="ResultsGrid$ctl05$EditButton" type="image"> <input style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" mce_style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/drop.gif" mce_src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/drop.gif" title="Delete" id="ResultsGrid_ctl05_DeleteButton" name="ResultsGrid$ctl05$DeleteButton" type="image"> membership 1 1
    <input style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" mce_style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/edit.gif" mce_src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/edit.gif" title="Edit" id="ResultsGrid_ctl06_EditButton" name="ResultsGrid$ctl06$EditButton" type="image"> <input style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" mce_style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/drop.gif" mce_src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/drop.gif" title="Delete" id="ResultsGrid_ctl06_DeleteButton" name="ResultsGrid$ctl06$DeleteButton" type="image"> personalization 1 1
    <input style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" mce_style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/edit.gif" mce_src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/edit.gif" title="Edit" id="ResultsGrid_ctl07_EditButton" name="ResultsGrid$ctl07$EditButton" type="image"> <input style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" mce_style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/drop.gif" mce_src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/drop.gif" title="Delete" id="ResultsGrid_ctl07_DeleteButton" name="ResultsGrid$ctl07$DeleteButton" type="image"> profile 1 1
    <input style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" mce_style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/edit.gif" mce_src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/edit.gif" title="Edit" id="ResultsGrid_ctl08_EditButton" name="ResultsGrid$ctl08$EditButton" type="image"> <input style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" mce_style="font-family: Tahoma, Arial, Helvetica, Verdana, sans-serif; font-size: 8pt; color: #000000; border-width: 0px;" src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/drop.gif" mce_src="https://p3nmssqladmin.secureserver.net/themes/classic/images/action/drop.gif" title="Delete" id="ResultsGrid_ctl08_DeleteButton" name="ResultsGrid$ctl08$DeleteButton" type="image"> role manager 1 1



    Wednesday, September 15, 2010 8:20 AM
  • User-5080209 posted

    thanks so much this really helped and it was a great explanation.

    Tuesday, July 12, 2016 2:20 PM