安装DNN 4.8的时候出现这个错误
Connection Error(s):
Index #: 0
Source: .Net SqlClient Data Provider
Class: 20
Number: 53
Message:An error has occurred while establishing a connection to the server.When connecting to SQL Server 2005, this failure may be caused by thefact that under the default settings SQL Server does not allow remoteconnections. (provider: Named Pipes Provider, error: 40 - Could notopen a connection to SQL Server)
因为对于SQL Server 2005 Express Edition 和 SQL Server 2005 Developer Edition 默认的设置是不允许 remote connections 的,参考MSDN的文档可以更改设置:http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
我的机器上安装了SQL 2000 的Personal版本和SQL 2005 Express(随VS自动安装的),我使用的是SQL 2000的Personal版本,应该不存在这个问题。在研究一番之后找到了答案。
在没有安装SQL 2005 Express之前,我的机器上只有一个SQL Server,我一般在连接字符串里使用local来指明使用本地的SQL 2000 Personal 版本。安装Express版后,机器上会存在两个SQL 的实例。如图:

一个是LAND001(我的计算机名),一个是LAND001SQLEXPRESS。这个时候,如果还是用local来指代SQL Server Personal版本,DNN安装是不会找Personal版,而是找到 Express版。
解决办法,连接字符串中使用SQL的实例名准确指定要使用的SQL Server,比如LAND001。
Connection Error(s):
Index #: 0
Source: .Net SqlClient Data Provider
Class: 20
Number: 53
Message:An error has occurred while establishing a connection to the server.When connecting to SQL Server 2005, this failure may be caused by thefact that under the default settings SQL Server does not allow remoteconnections. (provider: Named Pipes Provider, error: 40 - Could notopen a connection to SQL Server)
因为对于SQL Server 2005 Express Edition 和 SQL Server 2005 Developer Edition 默认的设置是不允许 remote connections 的,参考MSDN的文档可以更改设置:http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
我的机器上安装了SQL 2000 的Personal版本和SQL 2005 Express(随VS自动安装的),我使用的是SQL 2000的Personal版本,应该不存在这个问题。在研究一番之后找到了答案。
在没有安装SQL 2005 Express之前,我的机器上只有一个SQL Server,我一般在连接字符串里使用local来指明使用本地的SQL 2000 Personal 版本。安装Express版后,机器上会存在两个SQL 的实例。如图:

一个是LAND001(我的计算机名),一个是LAND001SQLEXPRESS。这个时候,如果还是用local来指代SQL Server Personal版本,DNN安装是不会找Personal版,而是找到 Express版。
解决办法,连接字符串中使用SQL的实例名准确指定要使用的SQL Server,比如LAND001。
继续阅读与本文标签相同的文章
下一篇 :
DNN模块开发入门指导
-
Spring Boot 2.x (一):第一个 Web 应用 Hello Spring Boot 2
2026-05-25栏目: 教程
-
重温 ES6 Symbol
2026-05-25栏目: 教程
-
初识数据库
2026-05-25栏目: 教程
-
.Net程序员必备-打印版Visual C#(VB) 2008 快捷键索引
2026-05-25栏目: 教程
-
在应用程序级别以外使用注册为 allowDefinition='MachineToApplication' 的节是错误的解决办法
2026-05-25栏目: 教程
