SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40)

Last post 04-17-2008 7:57 AM by Siby2000. 3 replies.

Sort Posts:

  • SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40)

    04-15-2008, 8:52 AM
    • Loading...
    • ChrisDev
    • Joined on 03-22-2006, 7:43 AM
    • Posts 114

    Hi,

    My .NET 2005 application is on a server outsite company's domain. SQL server is in domain and port for sql server is open. TCP/IP is set for remote connection in SQL Server. Connection string in .config is

        <add name="X_Conn" connectionString="Data Source=XXX;Initial Catalog=XXX;User ID=XX; Password=XXX;" providerName="System.Data.SqlClient"/>

    I receive the error below:

    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)

    thanks a lot in advance!

  • Re: SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40)

    04-15-2008, 9:03 AM
    Answer
    • Loading...
    • somnathmali
    • Joined on 07-16-2007, 8:09 AM
    • Pune , INDIA
    • Posts 257

     Check the Remote connection properties.

    Sql Server 2005 >>  Configuration Tools >> SQL Server Surface Area Configuration

    Now open the  

    Surface area config for services and connections

    then Select your server. and check the Remote connection properties, 

    Somnath Mali
    .NET Developer , Pune INDIA.


    http://www.fotosplatter.com



    http://somnath-ms-dot-net.blogspot.com


    Please Mark As Answer If my reply helped you.

  • Re: SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40)

    04-15-2008, 9:06 AM
    Answer
    • Loading...
    • kamii47
    • Joined on 05-26-2005, 4:04 PM
    • Karachi, Pakistan
    • Posts 1,889

    Go to

    Program--> Microsoft Sql server 2005 --> Sql server 2005 surdface area Configuration --> DataBase Engine --> Remote connection

    Then Select Local and Remote  Connection

    In its sub section select Using both TCP/IP and NamePipe

    Kamran Shahid
    Sr. Software Engineer
    (MCP,MCAD.net,MCSD.net,MCTS,MCPD.net[web])
    Netprosys Inc.
    www.netprosys.com

    Remember to click "Mark as Answer" on the post that helps U
  • Re: SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40)

    04-17-2008, 7:57 AM
    • Loading...
    • Siby2000
    • Joined on 03-02-2008, 7:07 PM
    • Posts 72

    Make sure that SQL server is operating in Mixed Mode.  Refer to article below.

     http://www.vbsociety.com/Configure-Microsoft-SQL-Server-for-Mixed-Mode-Authentication.html

    Siby

Page 1 of 1 (4 items)
Microsoft Communities
Page view counter