Friday, February 12, 2010

Disable Logging for Folders/Files in IIS 7

Since turning off logging for IIS 7 folders or files is not as straight forward (or intuitive) as it is in IIS 6. I thought I would post the steps here. For IIS 6 you can follow the instructions in this MS Knowledge Base Article.

Disable IIS logging for a folder

  • Open up IIS 7 Manager
  • Expand the website in the left pane to see the folder structure.
  • Click on the folder name to select it.

               image

  • Double click on the Logging entry in the folder home page.

             image

  • Click the Disable link under Actions on the right pane.

            image

Disable IIS Logging for a file

The steps for a file are almost identical for an individual file.

  • After you select the folder where the file resides, click the Content View at the bottom of the middle pane to see all the contents of the folder.

               image

  • Select the file that you want, then click Switch to Features view under Actions on the right pane.

                image

  • Then follow same last two steps as above to turn off Logging for that file.

2 comments:

Mik Muller said...

How would you disable logging for all image files?

Paige Cook said...

Not sure that there is an easy way to do this in IIS. However, there are some suggestions in the comments from this question on Server Fault that may be useful.

http://serverfault.com/questions/366969/remove-static-file-logging-for-iis7