错误提示: (provider: Named Pipes Provider, error: 40 Could not open a connection to SQL Server)

解决方法:

在web.config中连接字符串为:

<appSettings>    <add key="connectionStrings" value="server=127.0.0.1;database=ViewBook;uid=sa;pwd=admin"/>   </appSettings>

我们看到server=127.0.0.1

当我将它去掉后,即可浏览!

<appSettings>    <add key="connectionStrings" value="database=ViewBook;uid=sa;pwd=admin"/>   </appSettings>

原文地址:https://www.cnblogs.com/zhangwei595806165/p/2385531.html