Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello

I installed "windows server 2008 enterprise" on server and "sql server R2" and from a client that it has windows XP . I can remote to the server from Remote Desktop Connection.

And also MSSQLSERVER in server is "Started".

But I can not make a connection to "sql server 2008 R2" in client to server and the error is :

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: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server) (.Net SqlClient Data Provider)

How I should do?
Posted

Hi Check in Your web config file inside connection string

i think u wrote like this:


SqlCon" value="Data Source=AJay\\XYZ;Initial Catalog=XYZ;User ID=XYZ;Password=XYZ"
remove one\ it will work fine.

like this:


SqlCon" value="Data Source=AJay\XYZ;Initial Catalog=XYZ;User ID=XYZ;Password=XYZ"
 
Share this answer
 
v2
I turned off firewall and it was solved.
 
Share this answer
 
It might be surface area configuration error or sql service configuration issue. Have a look at this thread for potential reasons and resolutions: Resolving A network-related or instance-specific error occurred while establishing a connection to SQL Server[^]

If needed, See steps for setting up Surface area configuration here..

If this does not resolve your issue, have a look at these thread:
http://forums.asp.net/t/1334649.aspx[^]
SQL SERVER FIX ERROR (provider: Named Pipes [^]
Quite few possible reasons and resolutions are proposed here too.
 
Share this answer
 
Comments
Mohamed Mitwalli 29-Apr-12 2:24am    
+5
Sandeep Mewara 29-Apr-12 2:40am    
Thanks!

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