Reading IIS Failed Request Tracing: Modules, Providers, and Timing Gaps

Failed Request Tracing (FREB) is the only diagnostic in IIS that shows you what each module did in sequence and how long it took. When an ASP.NET Core request returns 500.30, a rewrite rule loops, or a request spends four seconds somewhere between authentication and the managed pipeline, FREB is what tells you which stage owns the time. The problem is that FREB fails silently in several common ways: the rule matches no requests, the log directory has no write permission, or the trace ends at a module that stopped emitting events.

This article covers enabling FREB correctly on a Windows Server VPS, the provider names you will actually see in the XML, how to read the timing fields, and the specific failure patterns that produce empty or truncated traces. It assumes IIS 10 on Windows Server 2016 or later.

Enable It at the Site Level, Not Just Globally

Installing the feature (Install-WindowsFeature Web-Http-Tracing) adds the Tracing module, but it does nothing until a rule is configured. Rules live in system.webServer/tracing and can be defined at the server, site, or application level. The common mistake is creating the rule in the global configuration and forgetting that the site has its own web.config which overrides the section.

A minimal rule set that captures every slow and every failing request:

%windir%\system32\inetsrv\appcmd.exe set config "Default Web Site" -section:system.webServer/tracing/traceFailedRequests /+"[path='*']" /commit:apphost

Then add the status codes you care about: appcmd set config "Default Web Site" -section:system.webServer/tracing/traceFailedRequests.[path='*'].traceFailedRequests.[path='*'] /+[statusCodes='[statusCodeRange='500-599']'] for server errors, and a second entry for timeTaken='[timeTaken='00:00:03'] if you want to catch slow successes as well. A time threshold of three seconds is a reasonable starting point; lower it to one second while investigating a specific complaint.

Set the Log Path and Permissions Correctly

FREB writes XML files named fr000001.xml and so on, into a directory specified per-provider in the rule. The default is %SystemDrive%\inetpub\logs\FailedReqLogFiles. Two things break here. First, the application pool identity needs write access to the directory — grant it with icacls C:\inetpub\logs\FailedReqLogFiles /grant "IIS AppPool\MyAppPool:(OI)(CI)M" /T. Second, if you specify a path on a different drive, you must use the full physical path in the rule, not a virtual path; relative paths are resolved against the site root and the files end up somewhere unexpected.

Also set maxLogFiles and maxLogFileSizeKB in the tracing section. The defaults are 50 files and 1024 KB respectively, which a request-heavy site will consume in minutes during an incident. On a small VPS volume, 20 files at 512 KB is a better balance: enough to capture a reproduction, small enough that nobody fills the system disk.

Reading the Trace: Modules, Events, and Timings

Each FREB XML file contains a requestFailedRequests root with a failedRequest element and two child sections: requestFailedRequests metadata (URL, verb, status, trigger reason) and EventList. Inside EventList, every entry has EventName, ProviderName, ClassName, Time, and Duration in milliseconds. The Time field is relative to the start of the request, so the module with the largest Duration is usually the culprit.

The provider names that matter most:

  • WWW Server — request parsing, authentication phase boundaries, and the final response.
  • ASP.NET and ISAPI Filter — managed pipeline entry, where a long gap before the first ASP.NET event means the delay is upstream.
  • MODULE_SET_RESPONSE_ERROR_STATUS — the single most useful event: it names the module, the notification, and the HRESULT that produced the status code.
  • URL Rewrite Module 2 — each rule evaluation with match/no-match, which is how you prove a rewrite loop.
  • AspNetCoreModule — the handoff point to Kestrel, with the duration of the proxied request.

Look for MODULE_SET_RESPONSE_ERROR_STATUS first. If it fires at the AUTHENTICATE_REQUEST notification with HRESULT 0x80070005, the problem is authorisation, not application code. If it fires at EXECUTE_REQUEST_HANDLER with 0x8007007e, the handler DLL is missing — usually a wrong bitness for the application pool.

Common Failure: The Trace Is Empty

A rule that is configured but produces no files almost always fails on one of four points. The site is not running under the configuration you edited, because the rule was set at server level and the site’s web.config has <clear /> in the tracing section. The status code range does not cover the response, which is common when the application returns 200 with an error page. The path filter uses * but with a trailing slash. Or the URL Rewrite module changed the path before tracing evaluated it, so the path in the rule no longer matches.

Verify the effective configuration rather than the stored configuration: appcmd list config "Default Web Site" -section:system.webServer/tracing shows what IIS will actually apply, including inherited sections. If the traceFailedRequests collection is empty there, the rule is not in scope no matter what the GUI showed.

Common Failure: The Trace Stops Mid-Pipeline

A trace that ends abruptly after AspNetCoreModule with no corresponding completion event usually means the application crashed the worker process. FREB writes from within the pipeline, so a process exit produces a truncated file. Correlate the timestamp with the Windows Application log — an Application Error event with the same second gives you the exception and faulting module.

A trace that ends after ISAPI Filter but before any managed event points at a native filter or a request-filtering rule rejecting the request. Check system.webServer/security/requestFiltering for denyQueryStringSequences and hiddenSegments; a rejected request produces a 404.19 that appears in the trace as a MODULE_SET_RESPONSE_ERROR_STATUS from RequestFilteringModule.

Overhead: What FREB Costs in Production

FREB is not free. Enabling a rule that matches every path adds measurable latency — on the order of a few hundred microseconds per request per provider, but the number rises with the size of the EventList and the speed of the log volume. On a 4 vCPU VPS serving static content, a broad rule can push throughput down by 5–10 percent.

The practical approach is to make rules as narrow as possible: filter on the specific path or a query-string parameter that identifies the problem request, keep the status-code trigger tight, and disable the rule once the reproduction is captured. Leaving a global trace rule enabled “just in case” is how a VPS ends up with a full system disk and unexplained latency, the same class of problem described in our article on IIS logging analysis for slow requests.

Correlating With the ASP.NET Core Logs

When AspNetCoreModule shows a long duration, the request has left IIS and is inside the managed host. FREB cannot see further. Enable stdout logging in web.config to capture the application’s own output, and correlate by timestamp and by the X-Forwarded-For / request path. In .NET 8, W3CLogger writes the same fields FREB does but from the application side, which makes the two logs alignable on request start time.

If the gap is before the hosted application receives the request, it is usually a Kestrel readiness problem — the app started slowly after a recycle and IIS timed out. Preloading with the Application Initialization module eliminates that specific class of trace, as covered in our Windows VPS hosting notes.

A Repeatable Diagnostic Sequence

  • Enable FREB with a narrow rule matching the exact failing path and the observed status code.
  • Reproduce once, then immediately disable the rule to stop log growth.
  • Open the newest XML in the log directory and read MODULE_SET_RESPONSE_ERROR_STATUS first.
  • Sort events by Duration descending to find the dominant phase.
  • Map the last event’s provider back to the pipeline stage, then look at the component that owns that stage.
  • Delete the log files after analysis — they contain query strings and headers, sometimes including tokens.

One configuration note specific to hosted VPS environments: if the trace directory is on the system volume and disk usage is already high, the trace files themselves can cause an outage. Our KVM disk resize guide covers how to move that directory to a data volume without restarting IIS.

FREB is the highest-signal, lowest-cost diagnostic available on IIS, provided the rule is scoped. If you are debugging a specific failure and want a second pair of eyes on the trace, get in touch with the XML attached and the reproduction steps.

Leave a Comment