Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't Get Fiddler to Capture local traffic to IIS

I have recently installed the latest Fiddler (Fiddler4) and absolutely nothing that I try is working to get it to capture local traffic. I have an MVC application that is connecting to an MVC WebApi app both running on IIS, here's what I've tried:

  • Fiddler Options > Connections > Monitor All Connections & Use PAC Script
  • Changed the WebClient C# call to use the following URLs with no success:
    • http://machinename/app-name
    • http://localhostproxy.com/app-name
    • all of the ipv4 / ipv6 etc urls on this page http://fiddler2.com/documentation/Configure-Fiddler/Tasks/MonitorLocalTraffic
    • also tried using the . fix - http://localhost.
  • Changed my "Default Website" in IIS to run under a new AppPool that uses my local account, and ran Fiddler as administrator
  • added <system.net> <defaultProxy> <proxy bypassonlocal="False" usesystemdefault="True" /> </defaultProxy> </system.net> to my web.config of the MVC app.

Nothing has worked, I have no idea what to try. Any advice is greatly appreciated. Thanks, Shawn

like image 952
pharophy Avatar asked Jun 07 '13 22:06

pharophy


People also ask

Why is Fiddler not capturing traffic?

NET Framework are hardcoded not to send requests for Localhost through any proxies, and as a proxy, Fiddler Classic will not receive such traffic. This behavior was changed for Internet Explorer 9 in the Release Candidate build. IE9 RC allows Fiddler Classic to proxy traffic sent to localhost or 127.0.

How do I record traffic in Fiddler IIS?

To do this simple open Fiddler, go to _Tools > Fiddler Options_ > Connections then change the port listed within the “Fiddler listens on port” setting to 8888. Now if you fire up your application you'll start to see your requests stacking up in Fiddler ready for your inspection. Happy debugging!


1 Answers

I know you mentioned this in your OP, but this worked for me and was super simple to do, so I thought I would share in case others run into the same problem and don't want to go through the trouble of setting up a reverse proxy if they don't need to.


I got this to work by simply changing the IIS Application Pool whose traffic I wanted to inspect to run under my identity, since Fiddler seems to only capture traffic of the logged in user by default. Just make sure your user has all of the necessary permissions required by IIS; I'm an admin so this wasn't an issue for me. And of course, don't forget to change the IIS Application Pool identity back when you are done.

The other option of course is to instead log in as the user that the IIS Application Pool is running as (if it's not a service account like Network Service) and then run Fiddler while logged in as that other user.

like image 75
deadlydog Avatar answered Oct 11 '22 06:10

deadlydog