如何解决此问题:提供程序:命名管道提供程序,错误:40-无法打开与SQL Server的连接 [英] how to solve this problem: provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

查看:76
本文介绍了如何解决此问题:提供程序:命名管道提供程序,错误:40-无法打开与SQL Server的连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经开发了一个在线测试应用程序,并成功地将其托管在网上.我还购买了该提供程序上的mssql数据库.但是,当我尝试从计算机上运行项目时,就会出现此错误.

建立与SQL Server的连接时发生与网络相关或特定于实例的错误.服务器未找到或无法访问.验证实例名称正确,并且已将SQL Server配置为允许远程连接. (提供者:命名管道提供者,错误:40-无法打开与SQL Server的连接)

我使用的数据库连接字符串如下:

I have developed an on line test application and successfully hosted it on line. I have also purchased mssql database on that provider. But when i am trying to run my project from my machine it is giving me this error.

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)

the database connection string i have used is given below:

this.sConnectionString = "Data Source=112.56.175.194;Initial Catalog=MockTestDatabase;integrated security=true;User ID=xyz;Password=abc";

推荐答案

引用此链接.
^ ]
希望对您有帮助.
Refer this link.
http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/[^]
Hope this helps you.


检查此答案
解决SQL连接问题 [
Check this answer
Troubleshoot SQL connectivity issues[^]



这篇关于如何解决此问题:提供程序:命名管道提供程序,错误:40-无法打开与SQL Server的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆