现在的位置: 首页 > 综合 > 正文

The ‘System.Web.Security.SqlRoleProvider’ requires a database schema compatible with schema version ’1′. 解决方法

2012年07月13日 ⁄ 综合 ⁄ 共 571字 ⁄ 字号 评论关闭
当我把sql2005数据库中生成的SqlServer2000脚本在远程数据库的查询分析器中注册后运行网站,发现错误:

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.

网上介绍介绍N多解决方法,我觉得这一种最简单!
打开本地 C:\WINDOWS\Microsoft.NET\Framework\v.xxxx(xxxx为开发网站framework的版本号) , 运行aspnet_regsql.exe 文件, 在弹出的界面中按照提示输入你虚拟主机上网站所用数据库的IP地址,用户名和密码,一路next,ok!

ok,至于为什么运行aspnet_regsql.exe注册 网上介绍了很多 Google一下

抱歉!评论已关闭.