问题:在建立与服务器的连接时出错。在连接到 SQL Server 2005 时,在默认的设置下 SQL Server 不允许进行远程连接可能会导致此失败。 (provider: 命名管道提供程序, error: 40 - 无法打开到 SQL Server 的连接)
从别的机子上考回来的程序,在本上一运行就这个错误,SQL Server 数据库连不上,牛人给解决一下。用ASP.NET连接的。
...全文
23811打赏收藏
SQL Server 不允许进行远程连接
问题:在建立与服务器的连接时出错。在连接到 SQL Server 2005 时,在默认的设置下 SQL Server 不允许进行远程连接可能会导致此失败。 (provider: 命名管道提供程序, error: 40 - 无法打开到 SQL Server 的连接) 从别的机子上考回来的程序,在本上一运行就这个错误,SQL Server 数据库连不上,牛人给解决一下。用ASP.NET连接的。
很多文章说过了
1. Enable remote connections on the instance of SQL Server that you want to connect to from a remote computer.
2. Turn on the SQL Server Browser service.
3. Configure the firewall to allow network traffic that is related to SQL Server and to the SQL Server Browser service.
这里有具体步骤:
How to configure SQL Server 2005 to allow remote connections
http://support.microsoft.com/kb/914277