【问题标题】:Publishing to IIS7 with custom MemberShipProvider gives error使用自定义 MemberShip Provider 发布到 IIS 7 会出现错误
【发布时间】:2012-10-04 19:02:39
【问题描述】:

我已经使用 MVC3、.Net 4.0 构建了一个网站,我正试图让它在我的测试服务器上运行。服务器是win2008 r2的默认安装。

在测试和调试(使用 ASP.Net 开发服务器)时,该站点运行良好。当我将站点发布到我的服务器时,站点工作正常,直到我在登录表单上按提交。我得到的错误如下所示。

配置错误

描述:处理此请求所需的配置文件时出错。请查看下面的具体错误详细信息并适当地修改您的配置文件。

Parser Error Message: Schema specified is not valid. Errors: 
(0,0) : warning 0005: Could not find schema information for the attribute 'Namespace'.
(0,0) : warning 0005: Could not find schema information for the attribute 'Provider'.
(0,0) : warning 0005: Could not find schema information for the attribute 'ProviderManifestToken'.
(0,0) : warning 0005: Could not find schema information for the attribute 'Alias'.
(0,0) : error 0010: The element Schema in namespace http:// schemas.microsoft.com/ado/2009/11/edm/ssdl was unexpected for the root element. The expected Schema in one of the following namespaces: http:// schemas.microsoft.com/ado/2006/04/edm/ssdl, http:// schemas.microsoft.com/ado/2009/02/edm/ssdl.

来源错误:

Line 36:       <providers>
Line 37:         <clear/>
Line 38:         <add name="CovleUserProvider" type="FileUpload.Models.CovleMembershipProvider" connectionStringName="UserInfo" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
Line 39:       </providers>
Line 40:     </membership>

源文件:C:\inetpub\wwwroot\web.config 行:38

一些侧面信息: 成员提供程序的名称和命名空间是正确的(它在开发机器上工作),成员提供程序是 Web 项目的一部分,但它引用了其他项目的 dll。所有参考资料都在 bin 文件夹中。

我尝试过的: 信任级别已满。 我不应该在 web.config 中引用我自己的程序集(据我从在线资源中得知)

谁能告诉我我做错了什么?

【问题讨论】:

    标签: asp.net-mvc-3 iis-7 web-config asp.net-membership


    【解决方案1】:

    您的aspnet_SchemaVersions 似乎是空的,这是它应该是什么样子的屏幕截图

    PS这个问题也可能对你有帮助ASP.NET Membership Error

    【讨论】:

    • 显然我完全不知道应该存在一个纯粹为了使用 ASP.Net 应用程序而存在的数据库。但我发现了哪里和什么,现在我已经准备好了。谢谢!
    猜你喜欢
    • 2011-04-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-04
    相关资源
    最近更新 更多