无法连接数据库

时间:2019-07-11 17:35:33

标签: .net sql-server

System.Data.SqlClient.SqlException
  HResult=0x80131904
  Message=A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)
  Source=.Net SqlClient Data Provider
  StackTrace:
<Cannot evaluate the exception stack trace>

Inner Exception 1:
Win32Exception: The system cannot find the file specified

我收到此错误。我检查了不同的资源,还没有解决办法

这是我的webConfig连接字符串

<connectionStrings>
    <add name="ConnStringDb1" connectionString="Data Source=localhost;Initial Catalog=SignupinfoDB;Integrated Security=True;" providerName="System.Data.SqlClient" />
  </connectionStrings>

0 个答案:

没有答案