Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 .NET Inside SQL Server (2005)
 provider: Named Pipes Provider, error: 40 - Could

Author  Topic 

mdwhite76
Starting Member

1 Post

Posted - 2010-08-12 : 18:27:39
Greetings,

I have a c# client that attempts to query an SQL database stored on a remote server. This was working without issues for weeks then all of a sudden, I began getting this error in my C# app.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

I have Sql Server 2005 Developer installed on a Windows 2008 box with mixed mode authentication. There's no instance name designated, exceptions have been added to the firewall for port 1433, sqlbrowser.exe, & sqlserver.exe. I've confirmed that the services are running. I've also ensured that the server is setup to accept remote connections and done all of the steps listed in this link

(http://blog.sqlauthority.com/2009/05/21/sql-server-fix-error-provider-named-pipes-provider-error-40-could-not-open-a-connection-to-sql-server-microsoft-sql-server-error/)

...I've read several articles that list similar steps.

I haven't configured any aliases but that didn't stop this from working before. I can ping the server from my client. This is making me bang my head against the wall!!

Please help!

Thanks!!
   

- Advertisement -