• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 843
  • Last Modified:

Named Pipes Provider, error: 40 - Could not open a connection to SQL Server

I have a Windows 2003 server housing a ASP.NET web site accessing a MS SQL 2005 Express DB. Both the website (IIS 6.0) and the DB reside on the same server. The Directory Security in IIS is set to anoynymous login with the local "IUSR_xxx" account. I have the SQL server set to mixed authentication mode and the "IUSR" setup as a login under the SQL Sever Security as well as a Trusted login on the Database it is trying to connect to. The permissions are set to "db_owner". I've checked the SQL Network Config and verified the Named Pipes and TCP/IP are enabled and running on port 1433 and that there is know application layer firewall blocking the traffic. Yet I still get a "(Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)" Is there something else that I am missing that could be preventing this connection? Thanks in advance

2 Solutions
Hemantgiri S. GoswamiCommented:

Ensure that you have enable TCP/IP and Named Pipe protocol , SQL Browser services; also disable shared memory protocol and check if it runs.

Hemantgiri S. Goswami
Run SQL Server Surface Area Configuration and enable Remote connections.
Or use SharedMemory protocol for local interprocess connections.

Featured Post

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now