简体   繁体   English

我的应用程序不使用SQL Server Express,但它正在寻找App_Data中的数据库 - 为什么?

[英]My app doesn't use SQL Server Express but it is looking for a database in App_Data — why?

My application uses SSRS (on SQL Server 2017 on a server) and IIS. 我的应用程序使用SSRS(在服务器上的SQL Server 2017上)和IIS。 It runs fine in my IDE (VS 2017 or VS 2015) but when I put it on the server I get an error page. 它在我的IDE(VS 2017或VS 2015)中运行良好,但当我把它放在服务器上时,我得到一个错误页面。

A network-related or instance-specific error occurred while establishing a connection to SQL Server. 建立与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. 验证实例名称是否正确,以及SQL Server是否配置为允许远程连接。 (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) (提供程序:SQL网络接口,错误:26 - 查找指定的服务器/实例时出错)

No connection string to SQL Server Express. 没有到SQL Server Express的连接字符串。

  • Firstly make sure that your SQL server is running and SQL Server browser service is running. 首先确保您的SQL服务器正在运行并且SQL Server浏览器服务正在运行。
    • Make sure SQL Server is configured to allow remote connections. 确保将SQL Server配置为允许远程连接。
    • Examine the SQL Server error log for messages confirming that SQL is listening on the expected network interfaces and ports. 检查SQL Server错误日志,查看确认SQL正在侦听预期网络接口和端口的消息。
    • Test server connectivity with PING from the client machine. 使用客户端计算机上的PING测试服务器连接。
    • Test port connectivity using TELNET or PowerShell to the server and port from the client machine. 使用TELNET或PowerShell测试端口连接到客户端计算机的服务器和端口。 For example a. 例如a。 TELNET 1433 b. TELNET 1433 b。 PowerShell: 1433 | PowerShell:1433 | % { echo ((new-object Net.Sockets.TcpClient).Connect("YourServerName",$ )) "server listening on TCP port $ " } %{echo((new-object Net.Sockets.TcpClient).Connect(“YourServerName”,$ ))“服务器侦听TCP端口$ ”}
    • Check firewall settings. 检查防火墙设置。
    • Also check your web.config file. 另请检查您的web.config文件。

You could also refer below article: “A network-related or instance-specific error occurred” 您还可以参考以下文章: “发生与网络相关或特定于实例的错误”

Regards, Jalpa. 此致,Jalpa。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM