【问题标题】:DB Connection ERROR after publishing the web application in IIS 6在 IIS 6 中发布 Web 应用程序后出现数据库连接错误
【发布时间】:2012-10-31 06:47:09
【问题描述】:

在 IIS 6 中发布 Web 应用程序后,出现以下错误

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) 

它在具有相同数据库连接的开发服务器中运行良好

请帮帮我

【问题讨论】:

标签: asp.net sql-server iis


【解决方案1】:

这可能存在多个问题。但基本问题是Web服务器无法定位数据库服务器。

尝试以下步骤找出确切的问题

  1. 可以从您的 Web 服务器 ping 数据库服务器吗?

  2. 您在连接到 SQL 服务器时是否提供了正确的用户。

  3. 您能否使用您在配置文件中提供的用户名从 Web 服务器连接到数据库服务器?

尝试以上所有方法,然后告诉我你的结果。

【讨论】:

  • 然后试试上面 Bui Akinori 发布的链接。它包含更多场景。
猜你喜欢
  • 2020-12-17
  • 2020-09-03
  • 1970-01-01
  • 1970-01-01
  • 2018-07-24
  • 2017-05-21
  • 1970-01-01
  • 2018-01-19
  • 1970-01-01
相关资源
最近更新 更多