Issue with Advanced Logging creating logs
Published Nov 05 2019 10:54 AM 3,736 Views
Microsoft

IIS 7, 7.5, and 8 used Advanced Logging feature as a customized logging option. IIS 8.5 introduced Enhanced Logging which is a built-in feature. If you still have a server that is using Advanced Logging, you may run into an issue with logging. In other words, no logs are created.

 

Firstly, check the Advanced Logging module in IIS and make sure that it is enabled.

clipboard_image_0.jpeg

 

After checking the module page, go to your applicationHost.config file. In my case, it was not logging anything because the enabled="true" attribute was missing.

clipboard_image_1.png

 

Enable/disable Advanced Logging per website

When you try to enable or disable Advanced Logging per website by following the this documentation, you may come across to the error below.

 

The request is not supported. (Exception from HRESULT: 0x80070032)

clipboard_image_2.jpeg

 

In order to get around this issue and configure Advanced Logging per site, you can use filters.

For example: Let’s say we don’t want logs for MigrationTest site. We can use the filter below to achieve it. Once you add this filter, It won’t create logs for that site anymore (If there is no log file in the folder, it will create a new one. However, it won’t log requests in this file)

 

In order to create a filter to disable logging for a site:

  1. Go to IIS Manager and click server name
  2. Double click Advanced Logging
  3. Double click the log definition (%COMPUTERNAME%-Server)
  4. Click Edit Filter
  5. Click Add Expression
  6. From Field list, choose Site Name
  7. From Operator list, choose Not Equals
  8. In the Value field, enter the site name. Click OK 
  9. Click Apply and Reset IIS

clipboard_image_3.png

1 Comment
Version history
Last update:
‎Nov 05 2019 10:54 AM
Updated by: