Capturing Dump using DbgHost.exe and Failed Request Tracing

Published May 18 2022 07:44 AM 596 Views
Microsoft

Failed Request Tracing feature or FREB for short, is one of the most useful debugging features of IIS. While it gives an overview of how the request is being processed, it also helps to trigger dumps for various failure scenarios.

 

We already know 2 ways of triggering dumps using FREB:
Using Debug Diag tool : Slow Response Automated Data Collection using FREB and debug diag
Using Procdump : Using FREB to generate a dump on a long running request

 

We recently came across a scenario where one of our customers was not able to use procdump and also didn't want to keep the debug diag rule running. In such a scenario, we used the dbghost.exe of Debug Diag to create a dump when FREB gets collected. This article will explain detailed step by step procedure for the same.

 

Prerequisites:

  • Install Debug Diagnostic tool. The latest version of the Debug Diagnostic tool can be found here
  • Identity of the Application pool being used, must be a member of local Administrators group
  • We also need to make sure that customActionsEnabled is true for the site we are working on. There are 2 ways we can do this:
    Using IIS:
    Go to the Configuration Editor at root level and navigate to system.applicationHost/sites. Click on the ellipsis at the right most corner to open up the sites:
    s4.png

    In the pop up window that appears select the required site and expand traceFailedRequestsLogging. Make sure the value for customActionsEnabled is True.s5.png

    Using applicationhost.exe:
    Go to the site level and make the following changes:
    traceFailedRequestsLogging enabled="true" customActionsEnabled="true"​
    

 

Instructions:

  • Configure the FREB rule in the root level of IIS Manager
  • In the site level enable the FREB rule. You can enable it by clicking on yellow box at the top most right corner or by choosing Edit Site Tracing:
    s1.png

  • In the site level load Configuration Editor and configure it as follows:
    s2.png


    Note: If the application pool is 32 bit, use this command line instead - C:\Program Files\DebugDiag\exts\dbghost.exe

  • Make sure you hit on Apply once the pop up window is closed
  • The dumps will be automatically generated at the location saved in Manual Userdump Save Folder. You can change this location by going to Tools -> Options & Settings -> Folders and Search Paths:
    s3.png

 

Co-Authors
Version history
Last update:
‎May 18 2022 07:04 AM
Updated by: