Tip #38: Did you know… How to use Failed Request Tracing to trace Rewrite Rules?

IIS7.0 Failed Request Tracing (FRT) is a powerful troubleshooting tool for request-processing failures. More details regarding FRT and how to enable it can be be found here.

Once the failed request tracing is enabled for your site, do the following to trace rewrite rules:

  • Double click on "Failed Request Tracing Rules" icon to get to the list of FRT rules.
  • frt 

  • Click on "Add …" action to bring up the FRT rule creation wizard.
  • frt1

  • On first page of the wizard choose “All content (*)”
  • Click “Next” and specify the status code(s) as “200-399”
  • frt2

  • Click Next and then uncheck all the trace providers except “WWW Server” and then uncheck all the provider areas except “Rewrite”
  • frt3

  • Click on Finish to save the FRT rule.
  • After the FRT rule is created, the log will start getting generated in %SystemDrive%\inetpub\Logs\FaileReqLogFiles\. You can open this log by using Internet Explorer, and it will be rendered as an HTML document that can be easily browsed.

    PS: If the Failed Request Tracing was installed after URL rewrite module, the "Rewrite" area in Trace Providers may not be available. If you do not see "Rewrite" area listed there, go to Add/Remove programs and then run URL rewrite module installer in repair mode.

    For more details on this, read this walkthrough.

    Don Raman
    SDET, IIS Team

    Comments (3)

    1. santeprog says:

      I had no idea how to do this let alone know you can!  It is really great that you can actually find out what happens to your request and be able to trace the problem especially 500 errors.

    2. My latest in a series of the weekly, or more often, summary of interesting links I come across related to Visual Studio. Channel 9 Stuff: XAML Guidelines, Part 2 10-4 Episode 2- Welcome to Visual Studio 2010 Greg Duncan posted a link to the downloads