none
Named Pipe DB Access Error RRS feed

  • Question

  • When attempting to access a remote sql server database from my website I get the following 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)

    The connection string I'm using is:
    connectionString="Data Source=x.x.x.x;Initial Catalog=NAME;Persist Security Info=True;User ID=x;Password=xxx"

    Using SQL server configuration and surface area management tools I have enabled TCP/IP and Named pipe connections, the ports are all correct to.  The SQL server DB is also accepting remote connections and there is no firewall present.

    All required services are running.

    I can connect using the SQLCMD utility.

    Any ideas?
    Thursday, September 6, 2007 2:51 PM

All replies

  • hii

     Please tell me have  u devloped the website in some different place using a different server if that the case then it may be possible because same happened to me just try to code the thing at that place with the real server and then build the solution that may remove the error as i have done the same. the cause may be u devloped on a place where u have a server install on ur pc now that the web config have that settings left with i may not be confirm in that!

     

    Thursday, September 6, 2007 2:58 PM
  • The problem is occuring when deploying on a clients server.  Exactly the same software using the same web.config as been deployed on several other servers without any problem. The only difference being the connection string in the web.config.
    Friday, September 7, 2007 7:29 AM