1

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

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

现在显示错误的这行代码(第 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

有什么建议么?

4

1 回答 1

1

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

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

祝你好运马特奥

于 2012-08-08T07:52:06.660 回答