Hi,
I got an error when i am connecting to remote database through c# code means,
SqlConnection con=new SqlConnection(constr);
Error:
"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)"
Please help me..
Thanks in advance
I got Network related error
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Khargesh RajputRank #616 · 3.9K reputationPosted Feb 27, 2015, 5:54 PM EST
check your connection string and also check sql server is opening or not with remote server
Manish Kumar ChoudharyRank #339 · 7.4K reputationPosted Feb 27, 2015, 2:32 AM EST
Go through following links it will, help you
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/8cdc71eb-6929-4ae8-a5a8-c1f461bd61b4/provider-sql-network-interfaces-error-26-error-locating-serverinstance-specified?forum=sqlexpress
http://www.sqlmusings.com/2009/03/11/resolving-a-network-related-or-instance-specific-error-occurred-while-establishing-a-connection-to-sql-server/