SQL Server 2005 named pipes error when using web services
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?
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.