Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've just installed SQL 2008, when I try to connect to it in my application I get the following error:

"System.Data.SqlClient.SqlException: 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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)"

Does anyone know what might be causing it?

Many thanks in advance :)

share|improve this question
    
Is the app on the physical machine as the SQL installation? If remote, have you enabled remote connections? What edition of SQL is it? Do you have a firewall between the app and the SQL server? –  Chris W Dec 15 '09 at 17:16
    
This is the most common question on ServerFault, I think. See here: serverfault.com/questions/7798/… –  Mark Henderson Jan 15 '10 at 4:16
add comment

1 Answer

Not to be a total jerk, but have you tried looking here. A lot of things can cause this error: incorrect connection string, server isn't running, firewall is blocking the ports, etc...

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.