Scenario: IIS running on a Windows Server Azure VM.
It seems that IIS does not log some failed requests, specifically requests that fail with status codes 500 or 401. However, it is known that such failed requests happen. Other failed requests (for example, with status 404, 443, etc.) do appear in logs.
These failed requests appear neither in
C:\inetpub\logs\LogFiles, now in
W3CIISLog in Azure Log Analytics.
Some of the missing "500" requests are due to crashes in native code invoked via ISAPI, and some of the missing "401" requests are due to custom application code returning 401 (i.e., they do not come from built-in" authentication mechanisms of IIS, ASP.NET, etc.)
I am not interested in alternative ways of catching these requests, such as Failed Request Tracing. I wonder what are possibles reason why some requests would not appear in the regular logs, and how to fix it. The goal is to log all requests in Azure Log Analytics.