0

let me explain you the current scenario. We have a asp.net application on framework 2 running on intranet(Windows 2003 Server and Sql Server 2000). Now we have a xp machine where we installed and configured IIS with a virtual directory pointing on the local Xp machine and this machine is connected to our intranet. We have copied the same application files of the server to this XP machine. But the thing is the connection string/database of the application is pointing towards the intranet server. The problem is when we try to run the application on the XP machine we get this error :

An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Is this query related or concerned with this site or stackoverflow ?

1 Answer 1

1

Serverfault is the right place for this question.

The error message is pretty clear: the ASP on the XP machine cannot connect to the SQL Server 2000 instance. It cannot find the SQL 2000 machine using the Named Pipes protocol. This can be caused by a multitude of factors:

  • WIND/DNS resolution, make sure the name of the SQL 2000 machine resolves on the XP machine (nslookup <sqlhost> on the XP host)
  • IP routing problem, make sure the SQL 2000 address is reachable from the XP machine (ping <sqlhost> from the XP host, not entirely accurate but a good start)
  • IPSec problems, make sure the SQL 2000 host allows TCP from the XP host (telnet on any open port on SQL host from XP host, ping would not be relevant for IPSec).
  • Named Pipes SMB protocol problem, make sure 'file sharing' protocol ports are enabled on both machines (135, 445). Or switch the XP client stack to use TCP protocol instead and make sure SQL 2000 is listening on the TCP protocol (recommended over Named Pipes), see Configuring Client Network Protocols and SQL Server Network Utility.
  • If you choose TCP over Named Pipes, also make sure that the SQL Server listening port is allowed on the firewall.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .