Sql server 提供程序:命名管道提供程序,错误:40-无法打开到SQL Server的连接

Sql server 提供程序:命名管道提供程序,错误:40-无法打开到SQL Server的连接,sql-server,Sql Server,在我的项目中,我在SQLServer2005中有DB,它在本地工作。但是,当我尝试使用凭据连接远程sql server 2008 R2时,出现了以下错误 System.Data.SqlClient.SqlException was unhandled by user code Message="A network-related or instance-specific error occurred while establishing a connection to SQL

在我的项目中,我在SQLServer2005中有DB,它在本地工作。但是,当我尝试使用凭据连接远程sql server 2008 R2时,出现了以下错误

 System.Data.SqlClient.SqlException was unhandled by user code
    Message="A network-related or instance-specific error occurred while establishing a     connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"
  Source=".Net SqlClient Data Provider"
  ErrorCode=-2146232060
  Class=20
  LineNumber=0
  Number=53
  Server=""
  State=0
我在远程服务器中启用了以下功能

1) 已使用SQL server配置管理器启动SQL server、SQL浏览器服务

2) 已将sql server、浏览器exe添加到防火墙允许的程序列表中

3) 重新启动sql server和浏览器

4) 在SQL server配置管理器中启用TCP/IP、共享内存和命名管道

5) 我在数据库属性中为此数据库启用了远程连接

6) 并按以下方式创建连接字符串

SqlConn = new SqlConnection(@"Data Source=IP address;Initial Catalog=DbName;
                            User ID=ID;Password=pwd ");
另外,当使用远程中的view current connection属性获取Db属性时,它显示服务对于DBname、身份验证模式、网络协议等条目不可用

如果任何人之前有这个问题,请帮助

谢谢和问候,
Tharadas.

连同问题中启用的选项,我通过执行以下更改解决了问题

1) 在Sql连接字符串中添加了Sql端口号(1533或1433)。 2) 为防火墙中的端口号添加异常

谢谢和问候
Tharadas k.p

错误消息提到命名管道,如果您通过禁用服务器上的命名管道和/或?命名管道不在1433或1533上而强制连接使用TCP/IP,会发生什么情况?因此这不太可能造成不同