首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >asp.netregsql的问题

asp.netregsql的问题
EN

Stack Overflow用户
提问于 2011-09-18 23:39:23
回答 1查看 1.1K关注 0票数 0

我从asp.netregsql使用,但当我想要登录到站点时,它会出现以下错误:

代码语言:javascript
运行
复制
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.

问题出在哪里?这是我的web.config文件:

代码语言:javascript
运行
复制
    <?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <connectionStrings>
    <clear/>
    <add name="LocalSQLServer" connectionString="Data Source=Mahdi-PC;Initial Catalog=Shop1;Integrated Security=True"/>
    <add name="CS" connectionString="Data Source=Mahdi-PC;Initial Catalog=Shop1;Integrated Security=True" providerName="System.Data.SqlClient"/>
    <add name="ApplicationServices" connectionString="Data Source=Mahdi-PC;Initial Catalog=Shop1;Integrated Security=True" providerName="System.Data.SqlClient"/>
  </connectionStrings>
    <system.web>
        <authorization>
   <allow roles="Admin" />
  </authorization>
  <compilation debug="true" targetFramework="4.0">
            <assemblies>
                <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
                <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation>
        <authentication mode="Forms">
            <forms loginUrl="~/Account/Login.aspx" timeout="2880"/>
        </authentication>
    <membership>
      <providers>
        <clear/>
        <add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
      </providers>
    </membership>
        <profile>
            <providers>
                <clear/>
                <add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
            </providers>
        </profile>
        <roleManager enabled="true">
   <providers>
    <clear />
    <add connectionStringName="ApplicationServices" applicationName="/"
     name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" />
    <add applicationName="/" name="AspNetWindowsTokenRoleProvider"
     type="System.Web.Security.WindowsTokenRoleProvider" />
   </providers>
  </roleManager>
    </system.web>
    <system.webServer>
        <modules runAllManagedModulesForAllRequests="true"/>
    </system.webServer>
</configuration>
EN

回答 1

Stack Overflow用户

发布于 2011-09-18 23:55:23

看起来您可能还没有设置应用程序名称。请参阅scott guthrie的这篇博客文章以获取帮助。

Always set the "applicationName" property

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/7462515

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档