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

Posted on 2007-07-25
Last Modified: 2012-06-27
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

Question by:johnarms
    LVL 7

    Accepted Solution


    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
    MS SQL Server MVP
    LVL 12

    Assisted Solution

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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Suggested Solutions

    Everyone has problem when going to load data into Data warehouse (EDW). They all need to confirm that data quality is good but they don't no how to proceed. Microsoft has provided new task within SSIS 2008 called "Data Profiler Task". It solve th…
    Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
    This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
    Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now