开发者

Linq failing to connect... or is it?

开发者 https://www.devze.com 2022-12-13 08:58 出处:网络
I have a web-application which is reciving the following while trying to connect to a database hosted on another server.

I have a web-application which is reciving the following while trying to connect to a database hosted on another 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)

Now, there problem here is that the connection strings, and the server paths area all perfe开发者_开发知识库ct.

  1. The site run correctly when run via cassini, on my local machine. (Connections strings are correct.)
  2. Other sites hosted on the same server are able to access the databse. (Server paths ara all active.)
  3. While the error says it's been unable to connect, Activity Monitor is aware of the query, and the Server Logs show no error. (Just odd.)

Google & Bing have massively failed with this, so I guess it's time to hit the Stack!


Open the Sql Server Conifguration Manager, expand Sql Server 2005 Network Configuration, click Protocols for <Yourserverinstance>, then check TCP/IP is enabled.

0

精彩评论

暂无评论...
验证码 换一张
取 消