Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
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 28-Apr-12 20:22pm
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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.
  Permalink  
Comments
Mohamed Mitwalli at 29-Apr-12 2:24am
   
+5
Sandeep Mewara at 29-Apr-12 2:40am
   
Thanks!
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Hi
 
Refer this link
solution for network related error[^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

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"
  Permalink  
v2
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

I turned off firewall and it was solved.
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 512
1 Maciej Los 445
2 Sergey Alexandrovich Kryukov 381
3 CPallini 170
4 PIEBALDconsult 148
0 Sergey Alexandrovich Kryukov 6,708
1 OriginalGriff 5,302
2 Peter Leow 3,837
3 Mika Wendelius 2,850
4 CHill60 2,748


Advertise | Privacy | Mobile
Web03 | 2.8.150224.1 | Last Updated 31 May 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100