Partager via


Configuring IIS to Log Data on a Remote Share

Applies To: Windows Server 2003, Windows Server 2003 R2, Windows Server 2003 with SP1

You can configure IIS to write log file data to a remote share. In the remote share, IIS creates a unique directory for each Web site, for example W3SVCX, where X is a random number generated by IIS to represent the specific Web site. IIS also creates the log file with exclusive write access, so that multiple machines cannot write to the same log file.

Important

You must be a member of the Administrators group on the local computer to perform the following procedure or procedures. As a security best practice, log on to your computer by using an account that is not in the Administrators group, and then use the runas command to run IIS Manager as an administrator. At a command prompt, type runas /user:Administrative_AccountName "mmc systemroot\system32\inetsrv\iis.msc".

Procedures

To log Web site data on a remote share

  1. Create a log file directory on a remote server in the same domain as your Web server running IIS.

  2. Change the directory properties so the directory is a share and assign the Everyone group Full Control permissions. If you want to write log files to a remote server in a different domain, see Setting Up a Null Session for Cross-Domain Logging.

  3. Ensure that your server running IIS has Full Control access permission on the remote share and read and write permissions on the remote log file directory. For more information, see Configuring Permissions for Remote Logging.

  4. In IIS Manager, expand the local computer, right-click the Web Sites folder, and click Properties.

  5. On the Web Site tab, ensure that the Enable logging check box is selected.

  6. In the Active log format list box, click a log file format.

  7. Click Properties.

  8. Click the General tab, and in the Log file directory box, type the full UNC path. For example, type \\servername\LogFiles, where servername represents the name of the remote server, and LogFiles represents the name of the share where the log files are stored.

  9. Click Apply, and then click OK. All Web sites within the directory begin logging data to the remote share.

Note

Logging to a UNC share is not supported by IIS FTP. You must configure the FTP log files location to a path on the local machine.