In this article, we will look into one of the features of IIS 7.5 that helps in logging HTTP web requests coming to a web site, which includes details like user name, user agent, time taken etc. This information is very useful in troubleshooting and performance tuning a web site.
You can see my previous articles on IIS 7.5 Feature:
- An Overview Of IIS 7.5 Feature - WebDAV
- An Overview of IIS 7.5 feature - Request Filtering
- An Overview Of IIS 7.5 Feature - Failed Request Event Buffering
- An Overview Of IIS 7.5 Feature - IP & Domain Restrictions
- An Overview Of IIS 7.5 Feature HTTP Redirect
Let’s open IIS 7.5 manager and check whether Logging module is present or not under IIS section as shown below:
If it does not exist, we can install same by going “Turn on or off Windows Feature” in Control Panel and selecting same under Internet Information Services, WWW Services, Health and Diagnostics, then click HTTP Logging.

Let’s select “Default Web Site”, double-click on Logging and understand its settings:

Let’s click on Enable under actions pane to log all HTTP requests coming to Default Web Site.
We can select Log file format:
- W3C: This is ASCII text-based format, handled by HTTP.sys and can customize fields to be logged by clicking “Select Fields”. Fields are separated by spaces and time recorded in UTC.
- IIS: This is ASCII text-based format, handled by HTTP.sys and fields cannot be customized Fields are separated by commas and time recorded in local time.
- NCSA: This is fixed ASCII text-based format, handled by HTTP.sys and fields cannot be customized. Fields are separated by spaces and time recorded in local time.
- Custom: To use a custom format for a custom logging module and can’t be configured from IIS Manager.
Let’s select W3C format and customize fields (Select Cookie) by clicking on “Select Fields”:

Specify a path to store log files and select whether IIS to create a new log file daily or weekly or on reaching specific log file size.
Let’s click Apply and browse Default web site than open log file present under:
%SystemDrive%\inetpub\logs\LogFiles.

We can see details like date time, HTTP status, sub status code, cookies, URL of all requests coming to Default Web Site.
Instead of IIS Manager, We can use appcmd.exe to configure it with below command:
appcmd set config /section:httpLogging /dontLog:True [This will disable logging at server level].

We can use Log parser and its Studio to analyze and filter IIS logs:

We can select log files and write a query to extract results like TOP 20 slow URLs, no. of requests per hour etc.
I am ending things here on Logging, I hope this article will be helpful for all.

Vivek KumarPosted Apr 24, 2016, 3:05 PM
Nice one
Saillesh PawarPosted Mar 30, 2016, 11:28 AM
NIce the only questions comes if it is already present in iis than why we use other dll for logging?
Debasis SahaPosted Mar 30, 2016, 8:55 AM
Good One..
Vignesh ManiPosted Mar 30, 2016, 8:44 AM
nice