How do I fix the error 'Named Pipes Provider, error 40 - Could not open a connection to' SQL Server'?

前端 未结 30 2667
借酒劲吻你
借酒劲吻你 2020-11-22 08:27

I can\'t seem to connect to my database from a site. I get this error:

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

30条回答
  •  死守一世寂寞
    2020-11-22 09:15

    I tried using the local IP address to connect as well as a public one. I've tried:

    Yes, the site can communicate with the server Named pipes/TCP is enabled. Remote connections are allowed. Windows Firewall is off Created an exception for port 1433 in Windows Firewall. Enabled everything in SQL Server Configuration Manager.

    i ensured and did the above as well and I just want to share that the DOUBLE BACKSLASH

    oBuilder.DataSource = "SPECIFICPCNAME\SQLEXPRESS";

    Using a SINGLE BACKSLASH resulted into a build error i.e.: Error 1 Unrecognized escape sequence

    I hope this helps the next guy - I've sacrificed dinner, midnight snack and NBA highlights time solving this (shame)

    Thanks to [Tamizh venthan] ^_^

提交回复
热议问题