2
Reply

i am using C# and dataaccessing tool is ado.net and trying to access data from sql-server2005 it gives an error mesage while run the programm Message:default setting not allow to connect

shahid husain

shahid husain

Jan 23, 2009
5.3k
0

    -- Previouly chk for the sql connect from other machine if its ok
    --then chk for the web.config does it is ok
    --chk for all sql connection in the web.config ur mentiond right or not

    shailesh rathi
    February 11, 2009
    0

    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 default settings SQL server does not allow remote connection. ( provider: Named Pipes Provider, error: 40 - could not open a connection to SQL server. )

    Fix/Workaround/Solution:
    Step 1) Make sure SQL SERVER is up and the instance you try to connect is running.
    Step 2) Your system Firewall should not block SQL Server port.
    Step 3) Go to Computer Management >> Service and Application >> SQL Server 2005 Configuration >> Network Configuration
    Enable TCP/IP protocol. Make sure that SQL SERVER port is by Default 1433.
    Step 4) Now follow this KB Article of MSDN depending on your server : http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277

    UPDATE : If above solution does not help refer the follow up post SQL SERVER - Fix : Error : 1326 Cannot connect to Database Server Error: 40 - Could not open a connection to SQL Server where additional issues with FIREWALL is explained with images.

    kelly gammons
    February 02, 2009
    0