I developed a .net application, which depends on the SQL Server database, the database was on the local machine used to develop the application.
When I moved the database to a remote computer and changed the connection string, I received the following error:
An error occurred while establishing a connection to the server when connecting to SQL Server 2005, this error may be caused by the fact that, by default, the SQL server does not allow remote connection. (provider: Named Pipes provider, error: 40 - Could not open a connection to the SQL server.)
This error only occurs with XP computers, but it works fine with Win. 7 Machines with the same connection string:
connectionString = "Data source = ot; Start directory = sp_warehouse; User ID = fu; Password = bar"
I tried the following: - Disable the Named Pipes service from the server. - Added exception in server firewall for SQL Server port 1433 - completely disabled firewall on the server. - Added this parameter to the connection string: Network Library = DBMSSOCN; Persist Security Info = True
Every time I try something, I get the same result, I win. 7 machines work fine, but XP machines do not work.
Note. Another application works with XP computers that use a different database on the same SQL Server and work fine.
source share