Skip to content

How to Enable IIS Failed Request Tracing Print

  • 0

Applies to: Windows Server 2019, Windows Server 2022, and Windows Server 2025.

Failed Request Tracing captures detailed pipeline diagnostics for selected status codes without tracing all traffic.

Prerequisites

  • Administrative access to the affected servers.
  • A verified backup and approved maintenance window.
  • A pilot system for testing before production rollout.

Step-by-step procedure

  1. Prepare a protected trace directory.
  2. Enable tracing for the affected site.
  3. Add a narrow rule for the relevant status code.
  4. Reproduce the failure and stop collection.

Commands

Import-Module WebAdministration
Set-WebConfigurationProperty -PSPath "IIS:\Sites\Contoso" -Filter "system.webServer/tracing/traceFailedRequests" -Name enabled -Value $true
Get-ChildItem C:\inetpub\logs\FailedReqLogFiles

Verification

A new trace matches the test URL, timestamp, and failure status.

Rollback

Disable tracing, remove the temporary rule, and securely delete traces after retention expires.

Security and operations

  • Use least privilege and document all production changes.
  • Replace example addresses and names with approved values.
  • Review relevant Windows event logs after implementation.

Related resources

Canadian Windows VPS and RDS hosting is available from networkmanager.info. Also review the official Microsoft Windows Server documentation.


Was this answer helpful?

« Back