provider:命名管道提供程序,错误:40 - 无法打开与SQL Server的连接 [英] provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

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

问题描述





在我的应用中,我使用过LINQ to Sql类。数据库位于远程位置。当我运行应用程序时,它在localhost中正常运行,但是当我在服务器上上传应用程序时它会给我以下错误:



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




所有东西在localhost中运行正常并且可以成功连接到SQL服务器,但托管后给我上面的错误。



感谢您的帮助。

Hi,

In my app., I have used LINQ to Sql classes. Database is remotely located. When I am running app, it runs fine in localhost and but when I am uploading app on server then it gives me below 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)


all things are running fine in localhost and can successfully connect with the sql server but after hosting gives me above error.

Thanks for help.

推荐答案

从服务器中的sql server配置管理器启用命名管道。
Enable named pipes from sql server configuration manager in the server.


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

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