I have a SQL Server 2000 running on Windows Server 2008 R2. From a remote Server, I can access the SQLServer from WINForm app (written in VS 3.5). But unable to connect from the same server, same connection string and same code using WIN Service (written
in VS 3.5). My connection string is like below:
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes
Provider, error: 40 - Could not open a connection to SQL Server)
I do not have any other version of SQL Server installed in server.
Hm... this one is a puzzle. Usually it is the other way around, it works on the server but it does not from remote server.
Obviously TCP/IP and/or Named Pipes are configured correctly because you can connect from remote machine. But for some reason network traffic on those protocols is blocked when you are on the same machine as SQL Server!?
Only thing that comes to my mind is to try to enable Shared Memory protocol that can only be used for connectivity between client and SQL server when client is on the same machine as SQL Server.