14

I had a problem that Fiddler wasn't showing my web service calls made from my application (running locally). I found and solved my problem.

So my question is not how, but why does Fiddler not show web service traffic? I have a very limited understanding of how network traffic works so this might be quite simple/obvious. All I'm able to decipher is:

  1. I don't think it has anything to do with HTTPS, as I can see HTTPS requests in Fiddler (decoded if I want through Fiddler's settings).

  2. I copied a piece of code new WebProxy("127.0.0.1", 8888); in order to get it to work so it must have something to do with proxies?

This is an ASP.NET application in case that makes a difference.

Community
  • 1
  • 1
Chris
  • 2,630
  • 3
  • 31
  • 58
  • possible duplicate of [How do I get Fiddler to stop ignoring traffic to localhost?](http://stackoverflow.com/questions/214308/how-do-i-get-fiddler-to-stop-ignoring-traffic-to-localhost) - this answer: http://stackoverflow.com/a/842630/419 explains why. – Kev Sep 20 '13 at 09:59
  • Based on that, I have a service reference to a third party hosted service. So the web service is not localhost or local in any way, it is definitely talking outbound. Does this make a difference? It seems that answer is related to a local web service call. – Chris Sep 20 '13 at 11:05
  • This seems to me very much related to this question: http://stackoverflow.com/questions/214308/how-do-i-get-fiddler-to-stop-ignoring-traffic-to-localhost As you have a local proxy, Fiddler ignored your traffic. You may follow the link above to fix it. – Hongzheng Sep 20 '13 at 09:55
  • 2
    This might shed some light: http://fiddler2.com/blog/blog/2013/01/08/capturing-traffic-from-.net-services-with-fiddler – Kev Sep 20 '13 at 11:21
  • Fiddler is a proxy; it only sees things sent to it. By default, this includes most clients (e.g. browsers) running in your user account. IIS/ASP.NET runs in a different user-account. – EricLaw Sep 20 '13 at 16:52
  • @Kev That first paragraph was just the explanation I needed: `When Fiddler launches and attaches, it adjusts the current user’s proxy settings to point at Fiddler, running on 127.0.0.1:8888 by default. That means that traffic from most applications automatically flows through Fiddler without any additional configuration steps.` Although I guess I should also thank Eric as he appears to be the one who wrote it! – Chris Sep 20 '13 at 23:06

3 Answers3

26

Really old question but:

While the answer and comments hint towards the right solution, they are far from answering the question.

Fiddler sees traffic by your user account. Since web services run by the application pool identity, fiddler cannot see their traffic.

The easiest solution (and the only one that worked for me) is to change the website application pool user to run under your account

Simply:

  1. Open IIS
  2. Find your website application pool name (right click website -> Manage Website -> Advanced Settings -> Listed under Application Pool)
  3. Go to application pool advanced settings (Application Pools -> Right click your desired application pool -> Advanced Settings)
  4. Change User Account to your account (Identity -> ... -> Custom Account -> Set)
Jaqen H'ghar
  • 16,186
  • 8
  • 49
  • 52
  • 1
    Fiddler seems to default to the logged on user's traffic as well, regardless of "Run As...", so if your service runs as any user other than the logged on user, it will not see the traffic – Coruscate5 Oct 25 '18 at 19:31
  • If you get "**The specified password is invalid. Type a new password**", see https://stackoverflow.com/a/22613122/5749914 – Elliott Beach Feb 16 '19 at 20:35
4

As noted above:

That first paragraph was just the explanation I needed: When Fiddler launches and attaches, it adjusts the current user’s proxy settings to point at Fiddler, running on 127.0.0.1:8888 by default. That means that traffic from most applications automatically flows through Fiddler without any additional configuration steps. Although I guess I should also thank Eric as he appears to be the one who wrote it!

References

Paul Sweatte
  • 24,148
  • 7
  • 127
  • 265
1

adding the following content inside the config is also a solution.

 <system.net>
  <defaultProxy enabled = "true">
    <proxy bypassonlocal="false" proxyaddress="http://127.0.0.1:8888" />
  </defaultProxy>
</system.net>

Also, if the traffic from the web service is pointing to another application in same localhost, try using the machine name instead of localhost in the request url.

Santhosh
  • 729
  • 7
  • 19
  • 2
    I found this solution somewhere else and tried following it. It seems the schema for this section has changed or I can't figure out how to integrate it into the current
    tag. This is the existing tag
    – Zakk Diaz Aug 29 '18 at 21:53
  • 1
    if you working with asp.net, this is the correct answer. – MateusBello Jul 09 '19 at 11:44