Click here to Skip to main content
15,922,574 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
add name="libacpConnectionString" connectionString="Data Source=103.21.58.192;Initial Catalog=libacp;User ID=libacp_pune020;Password=dfe3ga34dfTTS12@"
providerName="System.Data.SqlClient"



error

<pre>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)</pre>
Posted
Updated 15-Mar-15 22:58pm
v3

The error is pretty specific, and does tell you exactly what the problem is, and what to do about it! :laugh:

The instance of SQL server you specified (the "DataSource" in the connection string) is not available to the computer that is running the code.
There are loads of possible reasons why, but the most common are:
1) The server is powered down
2) You specified the wrong server
3) You didn't change your connections string when you released software to production

So start by looking at exactly what the connection string contains, and check that against the network the code is executing on. Check the sever is OK, and the SQL instance is running (I have an intermittent problem with the LocalHost implementation on my dev machine: it doesn't always start on power up and I have to manually start it. I'll fix it one day, when I can find time...)
 
Share this answer
 
Comments
Member 8893861 16-Mar-15 12:44pm    
problem solved
thank you very much
OriginalGriff 16-Mar-15 12:52pm    
You're welcome!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900