Enable Logging_IIS_SP1_Dep
Applies To: Windows Server 2003, Windows Server 2003 with SP1
You can enable logging for individual Web and File Transfer Protocol (FTP) sites. After you enable logging for a Web or FTP site, all traffic to the site (including virtual directories) is written to the corresponding file for each site. You can also enable logging for specific virtual directories.
Requirements
Credentials: Membership in the Administrators group on the local computer.
Tools: Iis.msc.
Recommendation
As a security best practice, log on to your computer using an account that is not in the Administrators group, and then use the Run as command to run IIS Manager as an administrator. At the command prompt, type **runas /user:**administrative_accountname mmc %systemroot%\system32\inetsrv\iis.msc.
Procedures
To enable logging on a Web or FTP site
In IIS Manager, expand the local computer, expand the Web or FTP Sites directory, right-click the Web or FTP Site for which you want to enable logging, and then click Properties.
On the Web Site or FTP Site tab, click the Enable logging check box.
In the Active log format list box, click a format. By default, the format is W3C Extended Log File Format.
Note
If you select Open Database Connectivity (ODBC) logging, click Properties and type the ODBC Data Source Name (DSN) and the name of the table within the database into the text boxes. If a user name and password are required to access the database, type the necessary credentials, and click OK.
Click Apply, and then click OK.
To enable logging for a specific virtual directory on a site
In IIS Manager, expand the local computer, expand the Web Sites directory, right-click the virtual directory, and click Properties.
On the Virtual Directory or Directory tab, select the Log visits check box if it is not selected. By default, the check box is selected.
Click Apply, and then click OK.