1

How to use Fiddler to debug traffic from any app (eg. C#/WPF app).

Basically my WPF Application makes webrequests to a REST server that exists on another server.

I try and set up my proxy to communicate with Fiddler as follows.

HttpWebRequest req .. ... WebProxy proxy = new WebProxy("localhost.", proxy.BypassProxyOnLocal = true; req.Proxy = proxy;

Have tried "localhost" (No "." at the end), have tried "127.0.0.1" and other permutations.

I have tried the sugestions at
Get HTTP requests and responses made using HttpWebRequest/HttpWebResponse to show in Fiddler and other similar posts and still cannot see any traffic.

Any further ideas on why I am not seeing traffic would be appreciated.

Thanks

Community
  • 1
  • 1
TheWommies
  • 4,922
  • 11
  • 61
  • 79

2 Answers2

0

Try to give your machine name instead of localhost. If that doesn't help, Add the following section into your config file.

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

Find more details here

Santhosh
  • 729
  • 7
  • 19
0

In one of the answers to the question you referenced, did you see this note:

Also note the important "caveat" that is mentioned in the Fiddler FAQ:

Why don't I see traffic sent to http://localhost or http://127.0.0.1? IE7 and the .NET Framework are hardcoded not to send requests for Localhost through any proxies, and as a proxy, Fiddler will not receive such traffic.

There are some alternatives mentioned there that might help you catch that traffic.

Community
  • 1
  • 1
BrianC
  • 10,591
  • 2
  • 30
  • 50
  • Im also trying to send traffic, to addresses that are not localhost and do not see any traffic? Incidentally I tried using Fiddler on another PC with my app and it worked(though for some reason it mucked up my other functionality like http streaming). SOme mysterious reaosn I cant figure out why it does not work on my PC – TheWommies Jan 09 '12 at 22:20