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

Leave a Reply