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

前端 未结 30 2571
借酒劲吻你
借酒劲吻你 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条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-11-22 09:13

    If you are working with Asp.net core and using appsettings.json than write server as localhost and after write sql instance name for enabled named pipe like this

      "ConnectionString": {
        "dewDB": "server=localhost\\dewelopersql;database=dewdb;User ID=sa;password=XXXXX",
      },
    

提交回复
热议问题