简体   繁体   English

web.config中 <system.webServer> 错误

[英]web.config <system.webServer> error

VS 2015, .Net Framework 4.5.1, local IISExpress and Azure Web App VS 2015,.Net Framework 4.5.1,本地IISExpress和Azure Web App

Attempting to follow self healing config settings from: https://azure.microsoft.com/en-us/blog/auto-healing-windows-azure-web-sites/ 试图遵循自我修复配置设置: https//azure.microsoft.com/en-us/blog/auto-healing-windows-azure-web-sites/

Error: The element 'system.webServer' has invalid child element 'monitoring' 错误:元素'system.webServer'具有无效的子元素'monitoring'

The app compiles but fails at runtime both when run locally in VS2015 and when deployed to azure web app. 应用程序编译但在运行时失败,无论是在VS2015中本地运行还是部署到azure Web应用程序时。

I got around this issue by transforming the Web.Release.config file, for instance: 我通过转换Web.Release.config文件解决了这个问题,例如:

<system.webServer>
<monitoring xdt:Transform="Insert">
    <triggers>
        <statusCode>
            <add statusCode="500" count="10" timeInterval="00:00:30" />
        </statusCode>
    </triggers>
</monitoring>
</system.webServer>

I have also tried to include this Auto-Healing feature in my web app and I also got an internal server error when including this in my web.config and run locally. 我还尝试在我的网络应用程序中包含此自动修复功能,并且在我的web.config中包含此内容时也出现内部服务器错误并在本地运行。

  <system.webServer>
    ...
    <monitoring>
      <triggers>
        <slowRequests timeTaken="00:00:30" count="5" timeInterval="00:10:00" />
      </triggers>
      <actions value="Recycle" />
    </monitoring>
  </system.webServer>

However in my azure publication I have modified the web.config (using kudu) and restarted my web app with no errors. 但是在我的azure出版物中,我修改了web.config(使用kudu)并重新启动了我的Web应用程序,没有任何错误。

Mine is an Stardard app service plan 我的是Stardard应用服务计划

For now I have no verified if this trigger has some effect 目前我还没有验证这个触发器是否有效

hope this helps ! 希望这可以帮助 !

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

相关问题 web.config 的 System.webServer 和 System.web 部分 - System.webServer and System.web sections of web.config web.config system.webServer与system.web - web.config system.webServer Vs system.web 运行时访问web.config system.webServer / webSocket部分 - Runtime access to web.config system.webServer/webSocket section 如何在.NET 2中访问system.webserver web.config节点 - How to access system.webserver web.config node in .NET 2 UltiDev Cassini和 <system.webServer> web.config设置 - UltiDev Cassini and <system.webServer> web.config settings web.config 继承:<clear/> 导致 XML 解析错误<system.webServer><modules> - web.config inheritance: <clear/> causes XML Parsing Error in <system.webServer><modules> web.config 中 system.web 和 system.webServer 中的授权之间的区别? - Difference between authorization in system.web and system.webServer in web.config? 如何从web.config system.web和system.webServer读取Ihttpmodule - how to Read Ihttpmodule from web.config system.web and system.webServer 需要有关system.webServer重写规则的正则表达式设计的帮助。 - Need help for regex design in system.webServer rewrite rule in web.config 我的IIS 7 web.config中的system.webServer / security / authorization无法正常工作 - The system.webServer/security/authorization in my IIS 7 web.config is not working
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM