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

前端 未结 30 3018
借酒劲吻你
借酒劲吻你 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:10

    You will find most likely your DB name is not correct, you will see the server name in VS like "DESKTOP-0I14BKI" but if you open up SSMS you will see DESKTOP-0I14BKI\SQLBLAHBLAH , simply add "\SQLBLAHBLAH" (instance name) to your "server name" in VS connection properties.

    You will see:

    To Fix:

提交回复
热议问题