I am running with localhost and followed this article: http://www.telerik.com/blogs/capturing-traffic-from-.net-services-with-fiddler. Tried the code given in machine.config and web.config. Also tried with setting application pool with the same identity as specified in the article. It is still not working. I am unable to see the traffic in fiddler. However, if I just type http://localhost/test/api/values, I can see it in fiddler. So clearly .net is not sending the traffic.
I am using the latest version of fiddler 4.6.3.44034.
I was not sure if this is the right forum to report this but the article above suggested that I report here...
The .NET Framework is hardcoded to bypass proxies for the "localhost" address. The .NET team is yet to fix this; see https://visualstudio.uservoice.com/forums/121579-visual-studio-ide/suggestions/6359204-support-the-loopback-token-in-proxy-bypass-lists
You could workaround this in a number of ways; one simple one would be to register localhost.mycompany.com in your DNS pointed at 127.0.0.1. Alternatively, you could use one of myriad 3rd party entries that work the same way. Or you could use "localhost.fiddler" as the target machine name and simply remove the ".fiddler" suffix when you're not testing.
okay one thing worked is if I change from localhost the machine name. I was wondering if there is a generic way to do this instead of doing it per program...