【问题标题】:Installing Web helpers library with nuget使用 nuget 安装 Web 帮助程序库
【发布时间】:2012-08-04 18:56:14
【问题描述】:

如果我创建一个新项目并将其安装在该项目上,它可以正常工作,但是对我正在处理的项目执行此操作会出现此错误:

我已尝试替换所有 dll 文件、packages.xml、web.config。 使用我安装网络助手之前的文件,但问题仍然存在。

现在显示错误的这行代码(第 50 行)完全相同,并且在安装之前运行良好。

Server Error in '/' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: The connection name 'DefaultConnection' was not found in the applications configuration or the connection string is empty.

Source Error: 


Line 48:     <membership defaultProvider="DefaultMembershipProvider">
Line 49:       <providers>
Line 50:         <add name="DefaultMembershipProvider" type="System.Web.Providers.DefaultMembershipProvider, System.Web.Providers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" connectionStringName="DefaultConnection" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/" />
Line 51:       </providers>
Line 52:     </membership>

Source File: C:\Users\BJARKE\Desktop\OlabsRepositories\iconbench\IconBench\web.config    Line: 50 

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.17626

有什么建议吗?

【问题讨论】:

    标签: c# model-view-controller asp.net-mvc-4 nuget helper


    【解决方案1】:

    不确定这是否能解决您的问题,但我遇到了同样的问题,我将这两行添加到 appsettings 下的 web.config 中进行了修复

    <add key="enableSimpleMembership" value="false"/>
    <add key="autoFormsAuthentication" value="false"/>
    

    祝你好运 马特奥

    【讨论】:

    • 谢谢!以后试试看!
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-04-06
    • 1970-01-01
    相关资源
    最近更新 更多