I have been capturing traffic using Fiddler for some ASMX services that call other ASMX services. In this case, I have a simple WCF service calling those ASMX services. It won't capture any traffic. The only wrinkle is that it is using IIS not IISExpress (http://localhost/Interface12Service/Interface12Service.svc)
. How can I capture WCF traffic?

- 732,580
- 175
- 1,330
- 1,459

- 1,644
- 7
- 35
- 62
4 Answers
The Microsoft .NET Framework is hardcoded to bypass proxies for any request to http://localhost
. To capture such requests in Fiddler or any other proxy, use
http://machinename:port/
or
http://localhost.fiddler:port/
as the target URL.

- 56,563
- 7
- 151
- 196
-
I didn't want to believe this was the answer.. or it would even work... but it did! – Kenny Thompson Nov 11 '14 at 18:41
By default, Fiddler will not capture the traffic. If you want it to capture the traffic, change the client proxy base address to your machine name or to your IP (for instance: 127.0.0.1). This should do the trick. If not, try this.

- 1
- 1

- 1,106
- 7
- 23
-
Alternatively, you can also use WireShark or try [Charles proxy](http://www.charlesproxy.com/). – Superzadeh Sep 25 '13 at 14:27
-
Charles is also a proxy and is subject to exactly the same limitations as any other proxy. – EricLaw Sep 26 '13 at 19:05
It could just be that fiddler has difficulty picking up traffic from localhost
Try changing the address to http://localhost./Interface12Service/Interface12Service.svc
(Notice the dot after localhost.) This is a common hack for working with Fiddler.

- 7,443
- 1
- 34
- 61
-
How can set that if I am debugging an IIS service and it goes right to the IIS Test Client? There is no opportunity to change the URL. – user2471435 Sep 25 '13 at 14:47
Another possible issue is related to WCF
client (this may also include other clients but i'm not sure).
The client can be configured not to use the machine default proxy, which makes the client/application bypass Fiddler capture.
For further reading: What is the purpose of usedefaultwebproxy in WCF.

- 1,886
- 2
- 21
- 19