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.

The full error is:

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)

So I have SQL express running on my desktop and fired up the commerce starter kit 1.1beta1 (www.commercestarterkit.org) and was curious why it was throwing this error. The connection string looks like this: connectionString="Data Source=localhost; initial catalog=Commerce; user ID=USERNAME; password=PASSWORD;" Turns out that you actually have to set the Data Source to the actual machine name and instance. So if your workstation is named mybox and your instance of SQL express is named SQLEXPRESS your connection string will look like this: connectionString="Data Source=mybox\sqlexpress; initial catalog=Commerce; user ID=USERNAME; password=PASSWORD;" That should resolve it.  I found this fix by searching on the error and came up with it from the url: http://geekswithblogs.net/timh/archive/2006/01/30/67586.aspx Jess

author avatar
Jess
With a background in web development and web server administration dating back to 1994, Jess Coburn founded Applied Innovations in 1999. As CEO, he led the company to become a recognized leader in Windows Hosting, specializing in ASP.NET, E-Commerce, and advanced web application hosting. Under Jess's leadership, Applied Innovations became known for making cutting-edge technology accessible and affordable for businesses. Building on this success, Jess expanded his vision by founding QIT Solutions, a managed cloud, IT, and cybersecurity company, where he continues to leverage his extensive industry experience to deliver innovative and secure IT solutions to businesses.

Leave a Comment

Scroll to Top