Click here to Skip to main content
12,348,726 members (29,100 online)
Rate this:
 
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 19: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 29-Apr-12 2:24am
   
+5
Sandeep Mewara 29-Apr-12 2:40am
   
Thanks!
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 3

  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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160621.1 | Last Updated 31 May 2012
Copyright © CodeProject, 1999-2016
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