Reading IIS W3C log files

Posted: (EET/GMT+2)

 

If you need to troubleshoot web traffic on IIS, the W3C log files provide useful information about incoming HTTP requests and how the web server responses to them.

On Windows NT 4.0 and IIS, log files are typically stored under:

C:\WinNT\System32\LogFiles

Each web site you run has its own log directory. A typical W3C log entry looks like this:

1999-08-02 14:32:10 192.168.0.10 GET /contact.asp - 200

A log line includes the following information:

Date and time
Client IP address
HTTP method (GET or POST)
Requested resource
HTTP status code.

The status code 200 means the request completed successfully. Codes like 404 or 500 usually indicate problems.

You can quickly search the logs from the command line:

find "404" ex990802.log

This displays all requests that returned HTTP 404 errors. Large log files can also be opened with Notepad (can take time, though) or imported into spreadsheet applications for analysis.