Sql Server 2014R2 has the problem of "provider: named pipe provider, error: 40", unable to log in to the database

  Let me talk about the situation first. At that time, I was debugging a new project. After I restored its corresponding database, when I ran the project, I reported this error ( other projects on this computer can run ) .
  Then when I checked the Web.config of this new project, I found that the Data Source that it connected to the database was the IP address of the previous server.
It was like this before

<add key="数据库名" value="Date Source=之前服务器的IP地址; Initial Catalog=数据库名; User ..."/>

Change it to this, just use local

<add key="数据库名" value="Date Source=.; Initial Catalog=数据库名; User ..."/>

Guess you like

Origin blog.csdn.net/weixin_46676903/article/details/105626704
Recommended