Modifying IIS 7 log data in Windows 2008

Not all IIS logging properties are selected by default.  Some of them, which are not selected by default can provide some valuable information when troubleshooting performance or availability issues.

To modify the properties which IIS 7 logs, first open IIS Manager, then select the top level server as show in Figure 1.

Figure 1, display the properties of the Default Web Site.

Next, in the Feature View pane (center) double-click the Logging Icon as shown in Figure 2.

Figure 2, Logging Icon

If the icon is not present, it means that you have not installed the Logging Tools Role Service found within the Web Server (IIS) Role.  To see how to do this read the top portion of my other blog here.

After double-clicking on the Logging Icon, select the Select Fields button as shown in Figure 3.

Figure 3, IIS 7 logging enabled and IIS 6 log file properties button

Then select the properties you want IIS 7 to log for each request.  Figure 4 displays the window and properties list.

Figure 4, IIS 7 Logging Properties window

Make the modifications, I like to store all the possible information, then select OK and Apply found in the Actions pane (on right) to apply the changes.

The modifications will take effect immediately and no restart of IIS is required.

Once logging has been enhanced, you can then use the additional data to troubleshoot the current problem.  Be sure to manage your log files as the size and removal schedule may itself cause an impact on performance.

NOTE: A command I use to write the IIS logs on demand is "netsh http flush logbuffer".  A full list of netsh http commands exists found here.

Comments (5)

  1. Anonymous says:

    Really great to learn of a way to force a flush of the IIS logs. Thanks so much for throwing in that little gem. 🙂 Lots of great stuff on your blog. Thanks for the efforts.

  2. Anonymous says:

    How can I figure out the bytes after the error? like 206 0 0 1 What so those number mean? I know 206 is partial, how about the rest.?


  3. Anonymous says:

    Great ! Is it possible to Get the exception Message or any diagnostic messages for any status code ?

  4. Anonymous says:

    Why does IIS 7 not offer a way to disable logging of partial content (code 206)?  My logs are chock full of those due to multi-page PDFs and the way readers download PDFs one page at a time essentially.  I would like to eliminate all the code 206 duplicates.  Can't find a way, doesn't look possible unless I use a third-party tool to remove them.  Blah.

  5. Hi, I use a tool called ERR (Exchange) and the NET HELPMSG command to look for what these values means.  As far as what an HTTP Status code means, you can ask a question on the IIS forums or do an internet search.  HTH

Skip to main content