Logging
Cheat sheet · https://pcornel.dk/topic.php?topic=3361
Answer
IIS logging writes one line per request with time, client IP, URL, status, substatus and time-taken to C:\inetpub\logs\LogFiles, in W3C format by default. HTTP.sys errors are logged separately in HTTPERR.
Remember
- W3C fields are configurable per site.
- time-taken shows slow requests in milliseconds.
- HTTPERR logs requests rejected before reaching IIS.
First checks
Get-Website— sites, state, bindingsGet-IISAppPool— application pools and stateGet-WebBinding— bindingsGet-ChildItem IIS:\SslBindings— certificate bindingsGet-Content C:\inetpub\logs\LogFiles\W3SVC<id>\*.log -Tail 20— request log
Verify in this order
each request logged with status and timing
Where it usually breaks
First mismatch in target identity/version → persistent configuration/source of truth → provider/service/control plane → runtime/effective state → user/workload-visible result → event/log evidence; preserve identity/native error/pre-state before mutation.
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=3361