【问题标题】:Connection 'LocalSqlServer' was not found in the applications configuration or the connection string is empty在应用程序配置中找不到连接“LocalSqlServer”或连接字符串为空
【发布时间】:2014-06-14 11:12:34
【问题描述】:

我正在使用已安装 VS2012 和 VS2013 的 Windows 8.1,并且我在 IIS 上运行我的网站,但是每当我运行我的项目时,它都会给出一个错误,提示 LocalSqlServer 连接字符串在我的机器配置中为空。我查看了“C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config”目录下的机器配置,发现连接字符串在那里。我几乎花了 2 天时间,但无法让我的网站在 IIS 上运行。任何帮助表示赞赏?

Server Error in '/GCC.Server' 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 'LocalSqlServer' was not found in the applications configuration or the connection string is empty.

Source Error: 


Line 257:        <roleManager>
Line 258:            <providers>
Line 259:                <add name="AspNetSqlRoleProvider" connectionStringName="LocalSqlServer" applicationName="/" type="System.Web.Security.SqlRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 260:                <add name="AspNetWindowsTokenRoleProvider" applicationName="/" type="System.Web.Security.WindowsTokenRoleProvider, System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
Line 261:            </providers>

Source File: C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Config\machine.config    Line: 259 

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

这是完全错误,因为我的笔记本电脑分辨率导致图像无法读取。

【问题讨论】:

  • 你能把有问题的完整错误发布在图片中吗?它不可读。

标签: asp.net windows iis


【解决方案1】:

我得到了它的工作,回复有点晚了。就我而言,答案很简单,问题是在 IIS 下。我去了IIS。选择默认网站并点击模块。在模块下只需删除 System.Web.Security.RoleManagerModule。

【讨论】:

    猜你喜欢
    • 2012-06-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-02
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多