11

I have a strange issue with a Windows Server 2008 R2 running IIS: HTTP logging stopped a few months ago (I just found out), and I cannot seem to get it to start logging again.

I have both HTTP Logging and Logging Tools installed (under Web Server/ Health and Diagnostics) and under IIS Manager > Logging, it is enabled (One log per: Site, Format: W3C, Directory: "%SystemDrive%\inetpub\logs\LogFiles", etc. - all default stuff).

Yet under C:\inetpub\logs\LogFiles\W3SVC1 / W3SVC2avalanche, etc., all files are months old.

I have also restarted the server, to no avail.

I tried to disable logging and then enable it again (in IIS Manager), but that did not help.

Lastly, I tried to enable via command-line (even though already enabled):

C:\Windows\System32\inetsrv>appcmd set config /section:httpLogging /dontLog:False /selectiveLogging:LogAll

Applied configuration changes to section "system.webServer/httpLogging" for "MACHINE/WEBROOT/APPHOST" at configuration commit path "MACHINE/WEBROOT/APPHOST"

What I am missing??

  • Have you verified that permissions are still good? How about the file system space? – 87cd25770a Jun 6 '14 at 16:40
  • @kce Disk space is fine. Re. folder permissions, I am not 100%: I just gave IIS_IUSRS Full Control to C:\inetpub\logs and restarted the site, but that did not help. What should the permissions be (and on what specific folders are you supposed to set them - just the logs folder?)? – Jim Balo Jun 6 '14 at 17:35
  • 2
    I got this working. In the event log, I found this: "Owner of the log file or directory C:\inetpub\logs\LogFiles\W3SVC2\u_ex140606.log is invalid. This could be because another user has already created the log file or the directory." So I checked the owner of the logs folder, etc., and for some reason it was set to "Trusted Installer" instead of what it should have been: C:\inetpub\logs should be owned by SYSTEM and its sub folders owned by the Administrators group. After fixing this, it started working. – Jim Balo Jun 7 '14 at 1:46
  • @JimBalo it would be good to convert this to an answer to make it easier to see. – spuder Oct 6 '15 at 22:06
4

I know this is an old post (I'm a necromancer)! I found my way here in desperation via Google, and I believe that, at least on our server, the problem was that the "W3C Logging Service" in services.msc was stopped. Upon restarting it, the service worked fine (provided the proper folder permissions were in place, as described above). It appears that the problem our GMT -08:00 server ran into was this one:

https://support.microsoft.com/en-us/help/2982169/w3c-logging-service-crashes-in-iis-8.5-on-a-server-in-windows-8.1-or-windows-server-2012-r2

There is an update able to be downloaded within. Hope this helps someone.

2

Check you permission on log file folders. IIS will not write to folders owned by certain groups, such as users.

The folder should be owned by "Administrators" or "SYSTEM".

0

The Logging feature is managed in IIS UI on 3 levels: machine, site, application.

I had it enabled on the machine level, disabled on the site level (Default Web Site) level, and enabled on the the application level.

Once I enabled it (in the Actions pane on the right side) for the site, it started working.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.