IIS logging and incoming requests

iisiis-7.5loggingweb-serverwindows-server-2008-r2

When are incoming requests logged to file in IIS? Does it happen before or after they are processed and response is sent to the client? What happens in case if request is accepted but response isn't sent back (is the incomming request logged to file in this scenario)?

Best Answer

The request is logged after the response has been prepared (you have the ability to modify the data that will be logged, under your request).

It will be logged even during errors, even though some errors might end up in the HTTPERR-folder (by default under C:\windows\system32\LogFiles\HTTPERR), and I think that certain request might only show up there.

I had an issue where a firewall with http inspection would cut a connection that stalls for more than 2 minutes, and since the request failed with "broken pipe" sort of error, I think that only showed up in that error log with status 995.

IIS aborts request thread with status 995