Trace HTTP(S) communications issued by Sitecore

Sometimes, it’s very handy to monitor the outgoing traffic from a Sitecore instance to various other services, such as Coveo Platform services.

This article explains how to use Fiddler for this purpose.

Step 1: Configure Fiddler as the proxy

  1. Enable HTTPS decryption.

    1. In Fiddler menu, select Tools  Options.

    2. Select the HTTPS tab.

    3. Check the Capture HTTPS CONNECTs checkbox.

    4. Check the Decrypt HTTPS traffic checkbox.

      37099718
    5. When prompted, authorize the Fiddler certificate.

    6. Close the dialog.

  2. (Optional) You can enable filters to only monitor calls made to specific hosts.

    1. Click the Filters tab on the right-hand part of the screen.

    2. Check the Use Filters checkbox.

    3. In the Hosts section.

      37099719
      1. Set the first dropdown menu to No Zone Filter.

      2. Set the second dropdown menu to Show only the following Hosts.

      3. In the text area, enter the following host names.

        For example, to monitor calls made to Coveo, use these host names:

        • platform.cloud.coveo.com

        • api.cloud.coveo.com/push

        • s3.amazonaws.com

      4. Click the Changes not yet saved label to apply the changes.

        37099720

Step 2: Configure Sitecore to use the proxy

Note

Fiddler must be running. Otherwise, the Sitecore instance won’t be able to perform any outgoing request.

  1. Edit the Sitecore web.config file.

  2. Add the following XML snippet as an immediate child of the <configuration> element.

     <system.net>
       <defaultProxy enabled = "true" useDefaultCredentials = "true">
         <proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:8888" usesystemdefault="false" />
       </defaultProxy>
     </system.net>
  3. Save the web.config file.

  4. Recycle the Application Pool.

Step 3: Capturing the traffic

  1. Ensure that Fiddler is capturing traffic. Look at the capture indicator at the bottom left corner of the window. Use the F12 key to toggle capture.

    37099721
  2. In Sitecore, perform the action you want to monitor.

  3. As the task progresses, you should see the network traces appear in Fiddler.

  4. Once the task completes, save all the Fiddler sessions as a .saz file.

Important

Make sure to revert the proxy setting in the Sitecore configuration before you close Fiddler.