【发布时间】:2010-07-15 22:37:07
【问题描述】:
所以我有一个连接到我们的 SQLServer 的应用程序。 这适用于防火墙后面的任何服务器。
当我把它放在我们的实时服务器上时,在防火墙之外,与 sqlserver 的连接失败并出现此错误
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:
SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
我知道这是由于防火墙造成的,尽管网络管理员声称防火墙允许它通过(甚至说“你做错了”)
我能做些什么来看看它到底在哪里失败,看看它是否真的是防火墙并向他证明它是。 我使用的是机器的 IP,所以这不是 DNS 问题。 还有其他想法吗?
【问题讨论】:
-
您如何从防火墙的另一端连接到 SQL Server - 您使用的是哪种连接字符串?
-
使用 System.Data.SqlClient.SqlConnection 连接字符串看起来像(删除了私人信息)“数据源=0.0.0.0;初始目录=经销商;用户 ID=用户;密码=密码”
-
你能从 DMZ 机器上 ping SQL Server 机器吗?你能从这台机器上
telnet 0.0.0.0 1433(当然是正确的IP)吗?当然,我假设您的 SQL Server 已配置为在此处侦听端口 1433。 -
我可以 ping sqlServer.. 但我无法 telnet 到它我收到一条错误消息,提示无法在端口 1433 上打开与主机的连接:连接失败。
-
你能从防火墙内部的 1433 端口远程登录到 SQL 服务器吗?
标签: asp.net sql-server asp.net-mvc