Friday, May 20, 2022

Fiddler + EXE + localhost server

(a friend was asking about this one, so here's a repost / rewrite of a previous blog from 2014-12-03, back when Visual Studio 2012 was state of the art)

Capturing fiddler traffic between a local EXE and a web server running on localhost turned out to be a little more difficult than I originally imagined. I tried to set my server to localhost or 127.0.0.1 while my local EXE had a proxy through fiddler (localhost:8888), but some/most/many/mine web requests appear to skip proxies when going to a local address.

To get this done:

    1. Run fiddler (Download Fiddler Web Debugging Tool for Free by Telerik), make sure "File / Capture Traffic" is checked.
    2. Make sure fiddler's filters show traffic to localhost.fiddler

      I also like to Hide if URL contains /arterySignalR, which is a special endpoint that IIS express/Visual Studio will use on localhost for debugging. It can generate a lot of noise in fiddler.

      See below for a screen cap of my fiddler filter settings.
    3. Start your web server on localhost
    4. Reconfigure your EXE's target server to point to http://localhost.fiddler:>PORT< 
      This will be EXE specific.
      (note, >PORT< depends on the server you're running and what port it binds to)
    5. Start your EXE
    6. Make sure your EXE's proxy is pointing to localhost:8888, so all traffic goes through fiddler.

    Here's my current fiddler filter settings





    No comments:

    Post a Comment