为什么我无法从asp.net网站连接到远程SQL Server,而它是从SQL Server Management Studio中连接 [英] Why I am not able to connect to remote SQL Server from asp.net website whereas it is connecting from SQL Server Management Studio

查看:97
本文介绍了为什么我无法从asp.net网站连接到远程SQL Server,而它是从SQL Server Management Studio中连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么我不能,而它是从SSMS连接从asp.net网站连接到远程服务器

Why I am not able to connect to remote server from asp.net website whereas it is connecting from SSMS

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

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)

我试着在<建议所有可能的解决方案href=\"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/\"相对=nofollow>此链接

我查追随中为上述文章中给出,他们能/运行

I checked Followings as given in the above article, they are enabled/running


  1. SQL Server是启动和运行。

  2. 在SSCM启用TCP / IP

  3. 在Windows防火墙开放端口

  4. 启用远程连接

  5. SQL Server Browser服务运行

我搜索了sqlbrowser.exe但它不是在给定的目录中找到。

I searched for sqlbrowser.exe but it is not found in the given directory.

最后,我关闭Windows防火墙,但它仍然是行不通的。

Finally I switched off Windows Firewall but still it is not working.

更新:我们正在使用自定义用户的SQL Server(不是SA)上创建连接到SQL Server
我有用户帐户凭据来远程连接到服务器。
我试图登录时更改为我的凭据(管理员)。在Windows服务的SQL Server(MSSQLSERVER)和SQL Server代理(MSSQL Server)的服务。

UPDATE: we are connecting to sql server using a custom user created on sql server (not sa ) I have user account credential to Remote connect to server. I tried to change LogOn to my credentials (administrator) . in Windows Services SQL Server (MSSQlServer) and SQL Server Agent (MSSQL Server) services.

推荐答案

我得到了相同的问题,但与MySQL服务器。机架空间有两个MySQL服务器地址。一个用于从它们的本地网络之外的连接和一个用于从所述网络内的连接。你将不得不使用所需从网络内连接的地址。

I got the same issue but with mysql server. Rack space had two mysql server address. One for connecting from outside their local network and one for connecting from inside the network. you will have to use the address that is required to connect from inside the network.

这篇关于为什么我无法从asp.net网站连接到远程SQL Server,而它是从SQL Server Management Studio中连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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