Additional properties are now available for logging in the Httperr#.log file in IIS 6.0 (832975)



The information in this article applies to:

  • Microsoft Internet Information Services version 6.0

Important This article contains information about how to modify the registry. Make sure to back up the registry before you modify it. Make sure that you know how to restore the registry if a problem occurs. For more information about how to back up, restore, and modify the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows registry

SUMMARY

Microsoft Internet Information Services (IIS) version 6.0 introduces error logging in a separate file from the Web logs. This software update exposes more properties to configure in the error log. This article describes the extensions that have been made to the list of properties that are available in the Httperr#.log logging file. It also discusses how to modify the list of properties that are logged in the Httperr#.log file by modifying the registry.

SYMPTOMS

The Httperr#.log file logs all invalid requests. This behavior separates these requests from the IIS W3svc log file. However, by default, the Httperr#.log file does not contain the same fields that are available in the World Wide Web Consortium (W3C) Extended Log file format.

CAUSE

The Httperr#.log file enables IIS to log invalid requests separately from valid requests. Both logs are used to log information about client requests that are made to the Web server. However, IIS log entries are created when the send has completed. The error logging occurs after the driver has initiated the send but before the send has completed. Therefore, not all fields that can be logged in the W3C Extended Log file can be logged in the Httperr#.log file.

RESOLUTION

This software update makes these fields available in the Httperr#.log file.

Software update information

A supported software update is now available from Microsoft, but it is only intended to correct the problem that is described in this article. Only apply it to systems that are experiencing this specific problem. This software update may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next Microsoft Windows Server 2003 that contains this software update.

To resolve this problem immediately, contact Microsoft Product Support Services to obtain the software update. For a complete list of Microsoft Product Support Services phone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

File information

The English version of this software update has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.
   Date         Time   Version       Size     File name
   ----------------------------------------------------
   02-Feb-2004  22:47  5.2.3790.125  337,408  Http.sys

Implementation information

Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.

After you apply this software update, create the following registry key:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\HTTP\Parameters\ErrorLoggingFields (DWORD)

The new value in the registry controls the log fields that Http.sys error logging generates. By default, this value is the bitwise ORed value of the bit values of the default fields that are listed in the following table.

If you set the wrong field value, or if you set the field value to zero, or if the registry parameter is not present, the Http.sys parser uses the default fields. The bit value for each log field that is available is listed in the following table. To log all available fields, set the value of the ErrorLoggingFields registry key to 7DFF4E7 (hexadecimal).

To customize the fields that are logged, open the Windows Calculator, view the scientific version of the calculator, and then enter the hexadecimal values in the following table. Use the OR function to combine the values.

Note If you change the error logging configuration, you must restart the Http.sys parser.
Log field Default fieldAvailableField bit value
DATEYesYes0x00000001
TIMEYesYes0x00000002
S-SITENAMENoNo
S-COMPUTERNAMENoYes0x00000020
C-IPYesYes0x00000004
C-PORTYesYes0x00400000
S-IPYesYes0x00000040
S-PORTYesYes0x00008000
CS-USERNAMENoNo
CS-VERSIONYesYes0x00080000
CS-METHODYesYes0x00000080
CS-URIYesYes0x00800000
CS-URI-STEMNoNo
CS-URI-QUERYNoNo
CS(USER-AGENT)NoYes0x00010000
CS(COOKIE)NoYes0x00020000
CS(REFERER)NoYes0x00040000
CS-HOSTNoYes0x00100000
SC-STATUSYesYes0x00000400
SC-SUBSTATUSNoNo
SC-WIN32-STATUSNoNo
SC-BYTESNoYes0x00001000
CS-BYTESNoYes0x00002000
TIME-TAKENNoYes0x00004000
S-SITEIDYesYes0x01000000
S-REASONYesYes0x02000000
S-QUEUENAMENoYes0x04000000
Note This software update also adds W3C header information to the Httperr#.log file.

MORE INFORMATION

Microsoft Internet Information Services (IIS) version 5.0 does not implement the concept of an error log. IIS 5.0 logs invalid requests and valid requests in the same Web log file. IIS 6.0 improves on this design by providing a separation between valid and invalid requests. You can merge the events in the IIS Web logs and in the Httperr#.log file sequentially to create a consolidated view that is similar to the W3C logs in IIS 5.0.

When an HTTP 400 Bad Request is logged, this error implies that the request did not comply with HTTP RFC 2616. Therefore, everything in the header is treated as suspicious and invalid.

When the Http.sys parser experiences an error while parsing a URL, fields such as user-agent and referrer will not be available. The fields that are not available are logged as dashes (-) in the Httperr#.log file. Sometimes, a request can be fully parsed but can still be logged in the error log file for errors other than parsing. These errors may include timeouts or malformed requests that cause the IIS worker process to fail. When this behavior occurs, fields such as user-agent and referrer are available.

After you apply this software update, you must add an entry to the registry and then set its value appropriately before you can configure the list of fields that are available to log in the Httperr#.log file. By default, the field combination is the same field combination that is included with Windows Server 2003. However, some W3C Extended Log file fields are not available for error logging.

The following table compares error logging and IIS W3C Extended Log file logging. Unless otherwise noted, the interpretation and the values of the fields the same.

Note The new fields that this software update adds to error logging appear as bold text.
Log fieldError logging before updateError logging after updateW3C Extended LoggingComments
DATEYesYesYes
TIMEYesYesYesUnlike IIS log files, the time field does not incorporate the time that is spent while sending the request. The time stamp is taken just after the driver has sent the error response.
S-SITENAMENoNoYesError logs report the site ID instead.
S-COMPUTERNAMENoYesYes
C-IPYesYesYes
C-PORTYesYesNo
S-IPYesYesYes
S-PORTYesYesYes
CS-USERNAMENoNoYesAuthentication occurs in user-mode IIS. It is not available in kernel-mode error logging time.
CS-VERSIONYesYesYes
CS-METHODYesYesYes
CS-URIYesYesNo
CS-URI-STEMNoNoYesError logs report URI and Query as the single field CS-URI.
CS-URI-QUERYNoNoYesError logs report URI and Query as the single field CS-URI.
CS(USER-AGENT)NoYesYes
CS(COOKIE)NoYesYes
CS(REFERER)NoYesYes
CS-HOSTNoYesYes
SC-STATUSYesYesYes
SC-SUBSTATUSNoNoYesSubstatus from IIS is not available at error logging time.
SC-WIN32-STATUSNoNoYesWin32 user-mode status from IIS is not available at error logging time.
SC-BYTESNoYesYes
CS-BYTESNoYesYes
TIME-TAKENNoYesYesUnlike IIS log files, the TIME-TAKEN field does not incorporate the time that is spent while sending the request. Typically, processing time in kernel mode is less than one millisecond, especially for entries that are created for error such as parse errors. Therefore, the value in this field is typically zero.
S-SITEIDYesYesNo
S-REASONYesYesNo
S-QUEUENAMENoYesNoThis field shows the application pool name that the IIS worker process uses.
For more information about the naming schema for Windows software updates, click the following article number to view the article in the Microsoft Knowledge Base:

816915 New file naming schema for Microsoft Windows software update packages

For more information about the terminology that is used to describe Microsoft product updates, click the following article number to view the article in the Microsoft Knowledge Base:

824684 Description of the standard terminology that is used to describe Microsoft software updates


Modification Type:MinorLast Reviewed:10/26/2005
Keywords:kbHotfixServer kbQFE kbfix kbBug KB832975 kbAudDeveloper