[英]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.