Home » Asp.netRSS

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

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
 

 

6 Answers Found

 

Answer 1

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

 
 

Answer 3

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.

 

Answer 4

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

 

Answer 5

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


FeatureCompatibleSchemaVersionIsCurrentVersion
 common11
 health monitoring11
 membership11
 personalization11
 profile11
 role manager11



 
 
 
 

<< Previous      Next >>


Microsoft   |   Windows   |   Visual Studio   |   Follow us on Twitter