Export (0) Print
Expand All

Enable or Disable Logging (IIS 7)

Applies To: Windows 7, Windows Server 2008, Windows Server 2008 R2, Windows Vista

Enable logging for a server when you want IIS to selectively log only certain requests to a server based on configured criteria. As soon as server logging is enabled, you can enable selective logging for any site on the server. You can also then view the log file to see which requests are failing and which requests are succeeding.

Disable logging for a site when you no longer want IIS to log requests to a site selectively.

noteNote
By default, logging is enabled in IIS 7.

For information about the levels at which you can perform this procedure, and the modules, handlers, and permissions that are required to perform this procedure, see Logging Feature Requirements (IIS 7).

Exceptions to feature requirements

  • None

You can perform this procedure by using the user interface (UI), by running Appcmd.exe commands in a command-line window, by editing configuration files directly, or by writing WMI scripts.

  1. Open IIS Manager and navigate to the level you want to manage. For information about opening IIS Manager, see Open IIS Manager (IIS 7). For information about navigating to locations in the UI, see Navigation in IIS Manager (IIS 7).

  2. In Features View, double-click Logging.

  3. On the Logging page, in the Actions pane, click Enable to enable logging or click Disable to disable logging.

To enable logging, use the following syntax:

appcmd set config /section:httpLogging /dontLog:False

To disable logging, use the following syntax:

appcmd set config /section:httpLogging /dontLog:True

noteNote
When you use Appcmd.exe to configure the <httpLogging> element at the global level in IIS 7, you must specify /commit:WEBROOT in the command so that configuration changes are made to the root Web.config file instead of ApplicationHost.config.

For more information about Appcmd.exe, see Appcmd.exe (IIS 7).

The procedure in this topic affects the following configuration elements:

<httpLogging>

For more information about IIS 7 configuration, see IIS 7.0: IIS Settings Schema on MSDN.

See Also

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft