Rules you need for Fiddler

Tags: AJAX, ASP.NET, Atlas, JSON

From time to time I install Fiddler on new PCs and everytime I have the same problem: which rules do I need to get most from Fiddler. Here are my top 5 rules I use:

  1. In OnBoot() I use following two lines to display the raw request and response inspectors:
    FiddlerObject.UI.ActivateRequestInspector("Raw");
    FiddlerObject.UI.ActivateResponseInspector("Raw");
  2. To disable RSS traffic I search for the user agent and hide the sessions (for Office 2007 and Internet Explorer 7), put following lines in OnBeforeRequest:
    if (
        oSession.oRequest["User-Agent"].indexOf("Windows-RSS-Platform") >= 0 ||
        oSession.oRequest["User-Agent"].indexOf("MSOffice 12") >= 0
       )
       oSession["ui-hide"] = "true";
  3. To simulate a slow modem connection I use following lin in OnBeforeRequest and OnBeforeResponse:
    oSession["request-trickle-delay"] = "300";
    oSession["response-trickle-delay"] = "150";
  4. When I'd like to test my web site without cookies enabled I add following line in the OnBeforeRequest method:
    oSession.oRequest["Cookie"]="";
  5. To allow hand-editing an ASP.NET AJAX request I add a break in the OnBeforeRequest (the same I do for the response):
    if(oSession.oRequest.headers.ExistsAndContaines("Content-Type", "application/json") {
        oSession["x-breakrequest"] = "Break for JSON request";
    }

If you are using IIS on Windows XP/2000 you should check if the Reuse connections to servers (improved performance) is disabled because Windows XP/2000 does not allow more then 10 concurrent requests.

1 Comment

  • EricLaw [MSFT] said

    There's a typo in your copy/paste of ExistsAndContains( Also, you should probably remove cookies like: oSession.oRequest.headers.Remove("Cookie"); ...in order to avoid sending an empty header.

Comments have been disabled for this content.