【问题标题】:Monitoring triggers in web.config not working for .net core web app监视 web.config 中的触发器不适用于 .net 核心 Web 应用程序
【发布时间】:2019-09-07 11:15:36
【问题描述】:

我正在尝试在 .NET Core Web 应用程序的 web.config 文件中实现设置(见下文)。 Web 应用程序托管在 Azure 中。 该设置位于 system.webServer 部分,应根据文章在响应缓慢时重新启动工作进程: https://azure.microsoft.com/sv-se/blog/auto-healing-windows-azure-web-sites/

<monitoring>
 <triggers>
  <slowRequests timeTaken="00:01:00" count="10" timeInterVal="00:02:00" />
 </triggers>
</monitoring>

但是当使用此设置发布配置文件时,Web 应用程序崩溃并显示错误消息:

HTTP 错误 500.19 - 内部服务器错误

  • 工作进程无法读取 applicationhost.config 或 web.config 文件。
  • 无法访问请求的页面,因为该页面的相关配置数据无效。

有人在 Azure 中托管的 .net 核心应用程序中成功实现了此设置吗?

【问题讨论】:

    标签: azure .net-core web-config


    【解决方案1】:

    我发现缺少一项设置。完整的监控标签应该是:

      <monitoring>
        <triggers>
          <slowRequests timeTaken="00:01:00" count="10" timeInterval="00:02:00" />
        </triggers>
        <actions value="Recycle" />
      </monitoring>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-05-12
      • 2018-05-14
      • 2023-03-17
      相关资源
      最近更新 更多