Applies to: Windows Server 2019, Windows Server 2022, and Windows Server 2025.
IIS request filtering rejects unwanted HTTP methods and request patterns before they reach application code.
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
- Back up IIS configuration.
- Review application methods and upload requirements.
- Block one unnecessary method in the site scope.
- Test both valid and rejected requests.
Commands
Import-Module WebAdministration
Add-WebConfigurationProperty -PSPath "IIS:\" -Filter "system.webServer/security/requestFiltering/verbs" -Name "." -Value @{verb="TRACE";allowed="false"}
Get-WebConfiguration -Filter "system.webServer/security/requestFiltering/verbs"Verification
TRACE is rejected while required application methods continue to work.
Rollback
Remove the exact filtering entry or restore the IIS configuration backup.
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.
Scope filtering to the application and test the rejection
Request Filtering runs before the application handles a request, so an overly broad rule can break legitimate uploads, APIs or authentication flows. Identify the site or application whose request pattern is being changed instead of applying every example at the whole-server level. Save the existing configuration and confirm whether the section is delegated or locked.
For a blocked verb such as TRACE, inspect the collection before adding a duplicate entry. Test both the request that should be denied and normal GET, POST and upload behaviour used by the application. A generic error page is not enough to identify the reason; check the IIS status and substatus in the request log.
Content-length limits, extension restrictions and hidden-segment rules solve different problems. Base them on the application’s real requirements. Do not disable an entire filtering feature because one business request is rejected; narrow the change and keep the boundary that protects other paths.
After deployment, monitor unexpected rejections and retain an exact reversal for the added rule. Configuration inheritance matters: removing a local setting may reveal a parent rule rather than restore the behaviour you expected. Repeat the same pilot requests after rollback.
Related resources
Canadian Windows VPS and RDS hosting is available from managed Windows VPS hosting. Also review the official Microsoft Windows Server documentation.