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
- Prepare a protected trace directory.
- Enable tracing for the affected site.
- Add a narrow rule for the relevant status code.
- 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\FailedReqLogFilesVerification
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.