azureazure-web-app-serviceazure-diagnosticsazure-configuration

system.applicationHost entry in Azure Log Stream


I have an App Service which is happily running on Azure and everything works fine however when I view the Log Stream I have the following entries after Application Logs gets connected:

enter image description here

As you can see in above logs I get

2017-07-28T10:42:42 :(6,10), No element in the source document matches '/configuration/system.applicationHost/sites/site[@name='~1xxx']/application[@path='/websitelogs']'

This obviously is complaining about the system.application which I do not have in my web.config.

  1. Should I care about this message?
  2. How would I get rid of this message in Azure Log stream?
  3. Since system.applicationHost contains global configuration settings that are used by the Windows Process Activation Service in IIS, if I hypothetically speaking add a new section like the one in system.applicationHost

enter image description here

above configuration gets propagated to all sites on my azure server?


Solution

  • You should simply ignore this. :-)

    So the message is simply an indication that you have the Azure Web Site Log Browser Site Extension installed. The path /websitelogs corresponds to Azure Web Site Log Browser site extension.

    If you notice, it is performing a sequence of operations, where it

    This will be done for any Site Extensions that you have installed.

    At the end, if you check the applicationhost.config file, you will see an entry similar to this:

    <sites>
     <site name="~1samplewebapp" id="80239797">
        <application path="/websitelogs" preloadEnabled="true" applicationPool="~1kaushalp">
          <virtualDirectory path="/" physicalPath="D:\home\SiteExtensions\websitelogs" />
        </application>
      </site>
    </sites>
    

    You will find the Transformation logs here: D:\home\LogFiles\Transform

    Here is a snippet of the same activity from my logs:

    2017-07-28T16:41:41 Start 'websitelogs' site extension transform
    2017-07-28T16:41:41 :(6,10), No element in the source document matches '/configuration/system.applicationHost/sites/site[@name='~1samplewebapp']/application[@path='/websitelogs']'
    2017-07-28T16:41:41 Not executing Remove (transform line 6, 68)
    2017-07-28T16:41:41 StartSection Executing Insert (transform line 7, 64)
    2017-07-28T16:41:41 on /configuration/system.applicationHost/sites/site[@name='~1samplewebapp']/application
    2017-07-28T16:41:41 Applying to 'site' element (no source line info)
    2017-07-28T16:41:41 Inserted 'application' element
    2017-07-28T16:41:41 EndSection Done executing Insert
    2017-07-28T16:41:41 Successful 'D:\home\SiteExtensions\websitelogs\applicationHost.xdt' site extension transform
    

    Here is a screenshot of what this looks like

    WebSiteLogs Site Extension