首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > .NET >

An error has occurred while establishing a connection to the server

2014-01-28 
用ASP.NET 2.0访问SQL Server时,报错如下 An error has occurred while establishing a connection to the

用ASP.NET 2.0访问SQL Server时,报错如下
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 connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

数据源连接串都是正确的,其他工作站都可连接此数据库服务器,并且本机用查询分析器能够访问此SQL Server.但在页面中使用ADP.NET方式连接总是超时,请问如何解决?

------解决方法--------------------------------------------------------
1.http://support.microsoft.com/kb/914277
------解决方法--------------------------------------------------------
1.防火墙的对你主机IP的限制
2.SQL 2005 TCP/IP的配置!
------解决方法--------------------------------------------------------
连的是2005还是2000?
如果是2000,最好把机器上的sql2005关掉

        

热点排行