Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I originally tried this question on StackOverflow, but it was suggested that serverfault was a better choice. So, here it is...

Looking through my web logs, I see a lot of entries that don't interest me. Some of them are commonly used images, css files, and scripts, which I can easily exclude by un-checking the 'log visits' check box in IIS for the folder properties.

I would also like to exclude log entries for certain common requests which are not in their own folders. Mostly, 'favicon.ico'. 'scriptresource.axd', and 'webresource.axd'. These (especially scriptresource.axd) make up almost a third of a typical log file on my site.

So, the question is, how do I tell IIS not to log these requests? And is there any reason that this is a bad idea?

The purpose of doing this is to reduce the log file size and the amount of work the server has to do, to make the log file more manageable when I need to dig in to them for troubleshooting, and for my own curiosity. I realize that log file parsers can skip the junk, but I am interested in reducing the raw files, before parsing.

share|improve this question
up vote 1 down vote accepted

IIS6 doesn't have a solution to exclude logs based on conditional logic. IIS7 does (

You can turn off folders from logging, so it is possible to exclude logs as long as they are in their own folders. i.e. you can turn off logging for your images and such.

In IIS6 you can have your stats application exclude them. Also compress all logs. They compress well.

Finally, if you really need to, you could use Log Parser to read from the logs and write just the important lines to another log file. Then delete the IIS logs daily and use your Log Parser copy.

share|improve this answer
Thanx Scott - I have been a little hesitant to upgrade since I don't have any real problems with IIS 6, and I understand that there will be some changes needed to allow my app to run. I will have to give it a shot. Also, thanx for the LogParser filtering idea - I hadn't thought of that. – Ray Dec 31 '10 at 2:31

You can also exclude individual files, as well as folders, from the log. In IIS right-click the file in question, choose properties then unclick Log visits.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.