Deployment: An error has occurred while establishing a connection to the server

by eliasen 14. January 2007 20:43


Sometimes I run into this error, when deploying a BizTalk project from VS.NET: "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)"

I take a quick look at it, bang my head in the desk for doing it again, and then I perform the following steps:

  1. Rightclick on the project and choose Properties
  2. Go to "Configuration Properties" => "Deployment"
  3. Change the "Server" property to be the servername of the SQL Server you are deploying to
  4. Save changes
  5. Deploy again

This happens if you receive a copy of someone elses project - since the servername is listed in the projectname.btproj.user file that is a part of the project.

Hope someone else gets quickly past this hurdle now it has been blogged.



BizTalk 2006

Comments (4) -

Arnulfo Wing
Arnulfo Wing
1/26/2007 1:35:27 PM #

another thing that I like to do, when on the development cycle is to change the name of the server field to (LOCAL).  This way you can share your code.


Ashwin Srinivas
Ashwin Srinivas
12/4/2007 8:41:09 PM #

Thanks for the blog post ... I just moved some apps from one dev machine to another, and sure enough, I forgot to change the deployment server name ... so it goes


Jan Eliasen
Jan Eliasen
12/4/2007 8:43:14 PM #

Yeah, exactly what happened to me Smile

Glad I could help.



7/19/2009 11:32:00 AM #


i was facing the error when opening connection using sqlconnection

nw got solved

See This


Add comment

  Country flag

  • Comment
  • Preview

About the author

Jan Eliasen is 37 years old, divorced and has 2 sons, Andreas (July 2004) and Emil (July 2006).

Jan has a masters degree in computer science and is currently employed at Logica Denmark as an IT architect.

Jan is a 6 times Microsoft MVP in BizTalk Server (not currently an MVP) and proud co-author of the BizTalk 2010 Unleashed book.

BizTalk Server 2010 Unleashed

Buy from Amazon

Microsoft MVP

6 times: July 2004, July 2008, July 2009, July 2010, July 2011, and July 2012. Not currently an MVP.


Image to show

Month List

Page List