Iis – Not seeing IIS related messages in Event Log

iiswindows-event-log

We've got a problem with a web service that we think is causing the app pool to restart itself but we're not seeing a message in the event log. This raises the question of whether or not our hypothesis is correct. So two questions really…

  1. Should we be seeing a message of some sort in the event log related to IIS? Even a "Hey I started and everything is great!" because we're not. We see 0 messages related to IIS in our event logs.

  2. If we should be seeing a message what can we do to start seeing messages?

Best Answer

From my answer on StackOverflow

You might want to turn on full AppPool Recycle Event logs:

 cscript adsutil.vbs Set w3svc/AppPools/DefaultAppPool/LogEventOnRecycle 255

You also might want to take a look at this Scott Guthrie blog article: http://weblogs.asp.net/scottgu/archive/2005/12/14/433194.aspx that shows how to write code in Global.ASAX to log the actual cause of an Application.End event.

This has been extremely useful to us in diagnosing several screwy issues - one in partictual was an app that was writing log files to the wwwroot directory - too many file changes resulting in a recycle...