SQL Server 2000报40错误

来源:互联网 发布:二维旋转平移矩阵 编辑:程序博客网 时间:2024/05/21 15:03

最近准备用asp.net 2.0写一系统,数据库用SQL Server 2000,开发环境用VS 2005。运行系统的时候报下面的错误:

An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote  onnections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

开始一直想不明白,我明明用的是SQL Server 2000,为什么报的错是connecting to SQL Server 2005。后来才想起是由于安装VS 2005时将SQL Server 2005的相关东西安装上了,以至于SQL Server 处理连接请求时用的是SQL Server 2005服务处理的。SQL Server 2005的默认配置是不允许远程连接的。因此会报上面的错误。关于SQL Server 2005远程连接的配置在SQL Server 2005 Configueration管理程序里有相关的设置。