It is fairly common for a .Net web application to use ASP.Net as the UI tier and WCF services in the middle tier. After an application has grown in complexity, it can be difficult to see how and what WCF calls are being made.
Fiddler is an excellent tool for proxying HTTP requests for viewing HTTP traffic in transit, but it does not work with .Net applications when using localhost. To use fiddler in a 2-tiered environment with ASP.Net MVC as the UI tier and WCF service as the service tier, make the following changes:
1. Modify Service web.config
2. Modify UI web.config
<endpoint address=”http://ipv4.fiddler:56640/Service.svc” binding=”basicHttpBinding”
That’s all! Enjoy!
Full code can be found on github: https://github.com/marksl/ASP.net-MVC-and-WCF-Sample