We help IT Professionals succeed at work.

SQL Server 2005 named pipes error when using web services

Last Modified: 2010-05-18
I'm consuming a web service from within a ASP.NET application. I get the following error when I try to execute a web method from within the application -

System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Data.SqlClient.SqlException: 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)
   at Documents.GetStatements(String clientId, String accountNumber, String begDate, String endDate)
   --- End of inner exception stack trace ---

Since the web service is an external one (hosted by a third party vendor), I'm unable to view the SQL Server settings, but I'm sure that remote connections are allowed. Is this an issue with the those settings or can I sort this out at client side here itself?

Watch Question


There are two types of remote connections, both TCP/IP and named pipes. By default both are disabled.

Without knowing the SQL Server configuration this is only a guess but could it be that TCP/IP is enabled and named pipes disabled? That's the way we run the servers at least to minimize the active surface areas.

Have you tried changing your connection string to use TCP/IP instead of named pipes?

If you're unsure on how to do it, post the connection string here and I'll help. Do not post the user name or password in the connection string though but replace them with bogus values.


Thank you for your response.

Since I'm consuming a third party web service, the SQL connection string is not exposed to me - I only reference the web service from within my code.

I'm corresponding with the third party vendor in order to get this sorted out - in the meantime, can you share a sample connection string that uses TCP/IP instead of named pipes?

This one is on us!
(Get your first solution completely free - no credit card required)
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.