{"id":673,"date":"2026-08-21T23:58:23","date_gmt":"2026-08-21T23:58:23","guid":{"rendered":"https:\/\/windows-vps.org\/blog\/?p=673"},"modified":"2026-08-21T23:58:23","modified_gmt":"2026-08-21T23:58:23","slug":"iis-failed-request-tracing","status":"publish","type":"post","link":"https:\/\/windows-vps.org\/blog\/iis-failed-request-tracing\/","title":{"rendered":"IIS Failed Request Tracing: Debugging 500 Errors and Slow Requests"},"content":{"rendered":"<p class=\"wp-block-paragraph\">A generic 500 page and one line in the event log is a poor starting point for debugging IIS. Failed Request Tracing (FREB) fixes that: it records a full trace of every module decision for requests that match your failure conditions, showing you exactly which module returned the error and why. It is the right tool for 500.19 configuration errors, 500.30 startup failures, slow pages, and rewrite loops.<\/p>\n\n<h2 class=\"wp-block-heading\">Enable the tracing feature<\/h2>\n\n<p class=\"wp-block-paragraph\">FREB is an optional IIS component. On a full GUI install: Server Manager, Add Roles and Features, Web Server (IIS), Health and Diagnostics, and tick Tracing. From PowerShell:<\/p>\n\n<pre class=\"wp-block-code\"><code>Install-WindowsFeature Web-Http-Tracing<\/code><\/pre>\n\n<p class=\"wp-block-paragraph\">The feature installs the provider and the log infrastructure; it does not start tracing anything until you define a rule.<\/p>\n\n<h2 class=\"wp-block-heading\">Create a tracing rule<\/h2>\n\n<p class=\"wp-block-paragraph\">In IIS Manager, select the site, open Failed Request Tracing, and enable it. Then open Failed Request Tracing Rules, Add Rule, and define:<\/p>\n\n<ul class=\"wp-block-list\"><li>Content to trace: all content, or a specific extension\/path (for example *.aspx or \/api\/*).<\/li><li>Failure conditions: status code ranges such as 500-599, or time taken over a threshold such as 30 seconds, or both.<\/li><\/ul>\n\n<p class=\"wp-block-paragraph\">Equivalent command-line setup with appcmd:<\/p>\n\n<pre class=\"wp-block-code\"><code>appcmd set site \"Default Web Site\" -traceFailedRequestsLogging.enabled:true\nappcmd set config \"Default Web Site\" -section:system.webServer\/tracing\/traceFailedRequests \/+\"[path='*',customAction=500]\" \/commit:apphost<\/code><\/pre>\n\n<p class=\"wp-block-paragraph\">Traces land in %SystemDrive%\\inetpub\\logs\\FailedReqLogFiles by default, one folder per failed request.<\/p>\n\n<h2 class=\"wp-block-heading\">Reading the trace XML<\/h2>\n\n<p class=\"wp-block-paragraph\">Each failed request produces an XML file (open it in a browser &#8211; the XSL stylesheet renders it readably) plus the raw file. The trace is a chronological list of events from every module that touched the request. You are looking for two things:<\/p>\n\n<ul class=\"wp-block-list\"><li>Entries with Level=&#8221;Warning&#8221; or &#8220;Error&#8221; &#8211; these are the events where a module failed.<\/li><li>The GENERAL_SET_RESPONSE_ERROR_STATUS \/ MODULE_SET_RESPONSE_ERROR_STATUS entries, which record the HTTP status and substatus code (for example 500.19 or 500.30) and name the module that set it.<\/li><\/ul>\n\n<p class=\"wp-block-paragraph\">The last error-level entry before the response is sent is normally your culprit. From the command line you can grep for it:<\/p>\n\n<pre class=\"wp-block-code\"><code>Select-String -Path \"C:\\inetpub\\logs\\FailedReqLogFiles\\w3svc1\\*.xml\" -Pattern \"MODULE_SET_RESPONSE_ERROR_STATUS\" | Select-Object -First 5<\/code><\/pre>\n\n<h2 class=\"wp-block-heading\">Common failure patterns<\/h2>\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Symptom<\/th><th>What the trace shows<\/th><th>Fix<\/th><\/tr><\/thead><tbody><tr><td>500.19<\/td><td>CONFIGURATION_ERROR event in the config section<\/td><td>Malformed web.config or missing section; fix the line reported in the trace<\/td><\/tr><tr><td>500.30<\/td><td>In-process startup failure before modules complete<\/td><td>Check the stdout log and Application event log for the real exception<\/td><\/tr><tr><td>502.5<\/td><td>Process failure in out-of-process hosting<\/td><td>The app crashed on launch; read stdout and fix startup<\/td><\/tr><tr><td>404.19 \/ 404.20<\/td><td>Request filtering rejected the extension<\/td><td>Add the extension to the allowed list in Request Filtering<\/td><\/tr><tr><td>Rewrite loop<\/td><td>Multiple URL_REWRITE passes with no terminal match<\/td><td>Fix the rewrite rules &#8211; add a condition or a stopProcessing flag<\/td><\/tr><tr><td>Slow request<\/td><td>Time taken exceeds your threshold; one module dominates<\/td><td>Identify the slow module (often auth or compression) and optimize it<\/td><\/tr><\/tbody><\/table><\/figure>\n\n<h2 class=\"wp-block-heading\">Static files and managed requests<\/h2>\n\n<p class=\"wp-block-paragraph\">FREB traces the whole pipeline, not just managed code. A slow static-file request shows up in the StaticFileModule events; a rewrite loop shows repeated URL Rewrite passes over the same URL. This is what makes FREB better than application logs alone for IIS-level problems: you see exactly which module spent the time or returned the status, including modules that never touch your application code.<\/p>\n\n<p class=\"wp-block-paragraph\">For ASP.NET Core apps specifically, split your debugging: FREB covers everything IIS-side (bindings, rewrite, request filtering, static files), while the app&#8217;s own startup failures surface in the stdout log and the Application event log. The classic pairing &#8211; a 500.30 in FREB plus a first-chance exception in stdout &#8211; resolves most broken first deploys in minutes.<\/p>\n\n<h2 class=\"wp-block-heading\">Retention and cleanup<\/h2>\n\n<p class=\"wp-block-paragraph\">Trace files accumulate fast. Set sane limits up front so a burst of failures cannot fill the disk:<\/p>\n\n<pre class=\"wp-block-code\"><code>appcmd set config -section:system.webServer\/tracing\/traceFailedRequestsLogging \/maxLogFiles:20 \/maxLogFileSizeKB:1024 \/directory:\"%SystemDrive%\\inetpub\\logs\\FailedReqLogFiles\"<\/code><\/pre>\n\n<p class=\"wp-block-paragraph\">That caps the site at 20 trace files of 1 MB each, which is plenty for a debugging session and self-cleaning afterwards. When the investigation is over, disable the rule in IIS Manager or with appcmd &#8211; leaving FREB enabled on a busy production site is a classic cause of unexplained disk-full alerts.<\/p>\n\n<h2 class=\"wp-block-heading\">Operational notes<\/h2>\n\n<ul class=\"wp-block-list\"><li>Tracing has a real cost: every matching request writes XML to disk. Enable FREB only on the site you are debugging, and only for the duration of the investigation.<\/li><li>Set sane limits &#8211; maximum trace file count and size &#8211; so a busy site does not fill the disk while you are away.<\/li><li>Disable the rule when you are done. Leaving FREB on in production is a common cause of mysterious disk-full alerts.<\/li><\/ul>\n\n<p class=\"wp-block-paragraph\">FREB turns IIS debugging from guesswork into reading a transcript. Enable the feature, define a narrow rule, reproduce the failure, and read the last error-level event &#8211; in most cases the fix is visible within minutes. If you are still choosing where to host the site you will be debugging, <a href=\"https:\/\/windows-vps.org\/#providers\">compare Windows VPS plans on our table<\/a>, or <a href=\"https:\/\/windows-vps.org\">check our main site<\/a> for Windows Server VPS options with full IIS access.<\/p>\n\n<p class=\"wp-block-paragraph\">If you want a Windows VPS where you control IIS completely &#8211; including Failed Request Tracing &#8211; <a href=\"https:\/\/affiliate.hostwinds.com\/idevaffiliate.php?id=33921&amp;url=3698\" rel=\"noreferrer noopener sponsored\" target=\"_blank\">Hostwinds&#8217; Windows VPS plans<\/a> include full administrative access and unmanaged control of the web server.<\/p>","protected":false},"excerpt":{"rendered":"<p>A generic 500 page and one line in the event log is a poor starting point for debugging IIS. Failed Request Tracing (FREB) fixes that: it records a full trace of every module decision for requests that match your failure conditions, showing you exactly which module returned the error and why. It is the right &#8230; <a title=\"IIS Failed Request Tracing: Debugging 500 Errors and Slow Requests\" class=\"read-more\" href=\"https:\/\/windows-vps.org\/blog\/iis-failed-request-tracing\/\" aria-label=\"Read more about IIS Failed Request Tracing: Debugging 500 Errors and Slow Requests\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":0,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-673","post","type-post","status-publish","format-standard","hentry","category-tutorials-guides"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.1 (Yoast SEO v26.1) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>IIS Failed Request Tracing: Debugging 500 Errors and Slow Requests - Windows VPS Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/windows-vps.org\/blog\/iis-failed-request-tracing\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"IIS Failed Request Tracing: Debugging 500 Errors and Slow Requests\" \/>\n<meta property=\"og:description\" content=\"IIS Failed Request Tracing: Debugging 500 Errors and Slow Requests\" \/>\n<meta property=\"og:url\" content=\"https:\/\/windows-vps.org\/blog\/iis-failed-request-tracing\/\" \/>\n<meta property=\"og:site_name\" content=\"Windows VPS Blog\" \/>\n<meta property=\"article:published_time\" content=\"2026-08-21T23:58:23+00:00\" \/>\n<meta name=\"author\" content=\"windows-vps\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"windows-vps\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/windows-vps.org\/blog\/iis-failed-request-tracing\/\",\"url\":\"https:\/\/windows-vps.org\/blog\/iis-failed-request-tracing\/\",\"name\":\"IIS Failed Request Tracing: Debugging 500 Errors and Slow Requests - Windows VPS Blog\",\"isPartOf\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/#website\"},\"datePublished\":\"2026-08-21T23:58:23+00:00\",\"author\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58\"},\"breadcrumb\":{\"@id\":\"https:\/\/windows-vps.org\/blog\/iis-failed-request-tracing\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/windows-vps.org\/blog\/iis-failed-request-tracing\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/windows-vps.org\/blog\/iis-failed-request-tracing\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/windows-vps.org\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"IIS Failed Request Tracing: Debugging 500 Errors and Slow Requests\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/windows-vps.org\/blog\/#website\",\"url\":\"https:\/\/windows-vps.org\/blog\/\",\"name\":\"Windows VPS Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/windows-vps.org\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58\",\"name\":\"windows-vps\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g\",\"caption\":\"windows-vps\"},\"sameAs\":[\"https:\/\/windows-vps.org\/blog\"],\"url\":\"https:\/\/windows-vps.org\/blog\/author\/myxiechengxuan\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"IIS Failed Request Tracing: Debugging 500 Errors and Slow Requests - Windows VPS Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/windows-vps.org\/blog\/iis-failed-request-tracing\/","og_locale":"en_US","og_type":"article","og_title":"IIS Failed Request Tracing: Debugging 500 Errors and Slow Requests","og_description":"IIS Failed Request Tracing: Debugging 500 Errors and Slow Requests","og_url":"https:\/\/windows-vps.org\/blog\/iis-failed-request-tracing\/","og_site_name":"Windows VPS Blog","article_published_time":"2026-08-21T23:58:23+00:00","author":"windows-vps","twitter_card":"summary_large_image","twitter_misc":{"Written by":"windows-vps","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/windows-vps.org\/blog\/iis-failed-request-tracing\/","url":"https:\/\/windows-vps.org\/blog\/iis-failed-request-tracing\/","name":"IIS Failed Request Tracing: Debugging 500 Errors and Slow Requests - Windows VPS Blog","isPartOf":{"@id":"https:\/\/windows-vps.org\/blog\/#website"},"datePublished":"2026-08-21T23:58:23+00:00","author":{"@id":"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58"},"breadcrumb":{"@id":"https:\/\/windows-vps.org\/blog\/iis-failed-request-tracing\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/windows-vps.org\/blog\/iis-failed-request-tracing\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/windows-vps.org\/blog\/iis-failed-request-tracing\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/windows-vps.org\/blog\/"},{"@type":"ListItem","position":2,"name":"IIS Failed Request Tracing: Debugging 500 Errors and Slow Requests"}]},{"@type":"WebSite","@id":"https:\/\/windows-vps.org\/blog\/#website","url":"https:\/\/windows-vps.org\/blog\/","name":"Windows VPS Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/windows-vps.org\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/44caceed916d0db318aa08d5623a7a58","name":"windows-vps","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/windows-vps.org\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3f2573db5afcd1a6ab9abcc5d48fc8e42584bc87ab9d98cc156e5b2097766dd9?s=96&d=mm&r=g","caption":"windows-vps"},"sameAs":["https:\/\/windows-vps.org\/blog"],"url":"https:\/\/windows-vps.org\/blog\/author\/myxiechengxuan\/"}]}},"_links":{"self":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts\/673","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/comments?post=673"}],"version-history":[{"count":4,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts\/673\/revisions"}],"predecessor-version":[{"id":686,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/posts\/673\/revisions\/686"}],"wp:attachment":[{"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/media?parent=673"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/categories?post=673"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/windows-vps.org\/blog\/wp-json\/wp\/v2\/tags?post=673"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}