欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

一句话回复:关于'SqlMembershipProvider' requires a database schema compatible with schema version '1'...

发布时间:2025/5/22 编程问答 38 豆豆
生活随笔 收集整理的这篇文章主要介绍了 一句话回复:关于'SqlMembershipProvider' requires a database schema compatible with schema version '1'... 小编觉得挺不错的,现在分享给大家,帮大家做个参考.
一个朋友说他建立好asp.net需要的membership-role关系后一直正常,后来运行了脚本,再运行时出现类似如下的错误

The 'System.Web.Security.SqlMembershipProvider' 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.

由于原先是好的,后来出现这个错误,所以系统提示的 schema (数据库结构)错误是不准确的,甚至是误导读者,根本原因是运行脚本清除了aspnet_SchemaVersions系统初始化的数据
  因此,解决方法是在aspnet_SchemaVersions里输入如下数据:
Feature     CompatibleSchemaVersion    IsCurrentVersion
common                         1                          1
health  monitoring         1                             1
membership                 1                             1
personalization                 1                         1
profile                             1                             1
role manager                 1                                 1
顺便说一下,这个没有什么特别的,你可以运行admin tool查看系统生成的数据内容

总结

以上是生活随笔为你收集整理的一句话回复:关于'SqlMembershipProvider' requires a database schema compatible with schema version '1'...的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。