2016-11-15 25 views
2

私はローカルのIIS expressとAzure WebアプリケーションでVisual Studio 2015を使用しています。System.webServerに無効な子要素 '監視'があります

これらの手順を使用して、Workerプロセスのリサイクルを実装しようとしています。

https://azure.microsoft.com/en-us/blog/auto-healing-windows-azure-web-sites/

私は<monitoring><trigger>を実装しようとすると、しかし、私は要素エラーに

を取得するには「system.webServer」

答えて

5

を「監視」に無効な子要素を持っているそれはおそらくですAzureのみの機能なので、変換ファイルに追加することをお勧めします。つまり、web.autoheal.config

<?xml version="1.0" encoding="utf-8"?> 
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> 
    <system.webServer> 
    <monitoring xdt:Transform="Insert"> 
     <triggers> 
     <!-- Scenario #1: Recycling based on Request Count --> 
     <requests count="1000" timeInterval="00:10:00"/> 
     <!-- Scenario #2: Recycling based on slow requests --> 
     <slowRequests timeTaken="00:00:45" count="20" timeInterval="00:02:00" /> 
     <!-- Scenario #3: Logging an event (or recycling) based on HTTP status code(s) --> 
     <statusCode> 
      <add statusCode="500" subStatusCode="100" win32StatusCode="0" count="10" timeInterval="00:00:30"/> 
     </statusCode> 
     <!-- Scenario #4: Taking custom actions (or recycling/logging) based on memory limit --> 
     <memory privateBytesInKB="800000"/> 
     </triggers> 
     <!-- Scenario #1 & #2 Action --> 
     <actions value="Recycle"/> 
     <!-- Scenario #3 Action --> 
     <actions value="LogEvent"/> 
     <!-- Scenario #4 Action --> 
     <actions value="CustomAction"> 
     <customAction exe="d:\home\procdump.exe" parameters="-accepteula w3wp d:\home\w3wp_PID_%1%_" /> 
     </actions> 
    </monitoring> 
    </system.webServer> 
</configuration> 
+0

これはAzureのみの機能なので、私は警告を無視することができます。無効な子要素 'monitoring'は正しいですか? –

+0

はいできます。公開前にこのxdt変換を使用してください。 – EvertonMc

+1

もちろん、要件を満たすために編集してください。私はここでいくつかのヒントを見つけましたhttps://channel9.msdn.com/Series/Windows-Azure-Web-Sites-Tutorials/Auto-Healing-an-Azure-App-Service – EvertonMc

関連する問題