I can connect the sql server instance through management studio and I can also create a DSN to the same sql server instance. But when the application tries to establish the connection i get the following error
I have checked the following
SQL BROWSER is started TCP/IP default port 1434 is enabled
At this point I am not sure how to proceed further to trouble shoot this issue.
System.Exception: 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) ---> System.Data.SqlClient.SqlException: 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Go to "All Programs->Microsoft SQL Server 2005->Configuration Tools->SQL Server Surface Area Configuration" Click "Surface Area Configuration For Services and Connections", Select "Remote Connections" and check if it is enabled for Local and Remote Connections and whether TCP/IP or named pipes of both......
Also, make sure you are passing the server name correctly.
Some times it may happened. But try to use TCP:servername or NP:servername. If thiswill also not work, Try with the IP address. Sometimes I have seen becuase of the DNS(Windows) issues you can be able to connect to the server with IP but not with the SERVER NAME.
Last but not least check with SELECT @@SERVERNAME.