不能访问远程数据库的问题error: 40 - Could not open a connection to SQL Server
toxxj 2014-12-23 11:12:25 求助:
我有两个网站,暂时叫网站A和网站B,这两个网站是放在两个不同的域名商的空间,现在的问题是网站A不能连接网站B的数据库了(MS SQL). 两个网站是共用一个数据库(放在网站B的域名空间),这样子方便管理,但自从12月20日开始网站A就不能连接网站B的数据库服务器了。
出现在错误提示如下:
Server Error in '/' Application.
The network path was not found
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.ComponentModel.Win32Exception: The network path was not found
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[Win32Exception (0x80004005): The network path was not found]
[SqlException (0x80131904): 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)]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +5295887
我能从本地电脑及其它的网站(如网站C,网站D)访问网站B的数据库,但就是网站A不能访问网站B的数据库。
我有联系网站A的域名服务商去解决这个问题,但他们的技术客服回复说不是他们的服务器的问题,然后我又去联系网站B域名服务商,也就是数据库这边的域名商去解决这个问题,同样也是回复说他们这边没有问题。
我有网站A上做过专门的测试,它能访问其它网站的数据库除了网站B的数据库。
同样网站B的数据库能被其它的网站访问,但就是网站A访问不了,提示上面的错误。
大家帮忙看看像这个问题是什么原因引起的,或者之前有没有碰到过这个问题,先谢谢了!