How do you disable logging in IIS 7

12,539

Solution 1

To disable all logging in IIS (7 + 7.5) you first need to change the default logging from per Site to per Server at the Server Level (as pictured above). Enable logging, change One log filer per to Server and then Disable it again. Done! (Note: IIS will restart with each enable / disable).

If you leave IIS set to One log file per site you have to disable logging on each individual branch of the tree as well as at the Default Web Site level. However even when I do this logging still occurs. Best to set IIS logging to Server and then disable. Much easier.

Solution 2

You can run this from cmd

%windir%\system32\inetsrv\appcmd set config /section:httpLogging /dontLog:True
Share:
12,539
Lucy
Author by

Lucy

Updated on September 18, 2022

Comments

  • Lucy
    Lucy over 1 year

    I'm trying to disable IIS logging on my Windows 2008 R2 servers so my hard drive doesn't fill up with log files during load testing. I've tried disabling logging at the server and website level in IIS, using both the UI and command line as Microsoft has specified: http://technet.microsoft.com/en-us/library/cc754631(v=ws.10).aspx

    When I use both methods listed in the above article the UI shows logging disabled throughout all of the nodes - server level, site level, application level but my Windows machines are still logging traffic.

    Logging Disabled

    I've tried disabling at only a site level and it does the same thing. I noticed this same problem in IIS7 on Windows 2008. Anyone have any suggestions?

    Additional information: Windows 2008 standard R2 (IIS 7.5) and non R2 (IIS 7). My application pools are set to .NET 4.0, Integrated mode and 32-bit Applications.