Search code examples
asp.netasp.net-mvcfiddler

HTTP traffic between asp.net mvc applications not visible to Fiddler


I have an ASP.NET MVC 4 application that needs to query another application to process requests. The MVC application makes it's request via REST. I can see the incoming HTTP request from the browser to the MVC application, but I can't see the outbound REST call from the MVC application to the REST application.

Both applications are running in IIS Express. I access the MVC application localhost:42001 and the REST application is using ASP.NET MVC WebAPI, listening at localhost:42002

How do I get the REST requests that are going to localhost:42002?

The request are making it to the REST application, I can also set and hit breakpoints in that code. I just can't see the traffic in Fiddler.


Solution

  • This is because Fiddler is a proxy. Your browser filters all the requests through Fiddler. Your web server is not proxy'ed through Fidder so web server to web server traffic won't go through Fiddler.

    To get that to work, you'd need to tell your web application to use Fiddler's proxy. It seems like you can follow http://fiddler2.com/documentation/Configure-Fiddler/Tasks/ConfigureDotNETApp which has some information on how to configrue your web application to send all requests through the proxy.

    Another idea, if you're willing to do some packet sniffing, you could use something like Wireshark and that would capture all traffic coming and going on your computer and then you could filter down to the information you need. This is overkill for what you're looking for, but could help at some point.