Search code examples
.netasp.net-mvchttpclientfiddler

HttpClient exception localhost.fiddler


In my ASP.NET MVC application I use service hosted on localhost:33321, I try to monitor traffic using fiddler.

When I type address localhost.fiddler:33321 in web browser service is opens to but when I use service in app I get exeptions from HttpClient

Unable to find 'localhost.fiddler'

I think that problem is related to DNS service or fiddler local proxy.


Solution

  • Solution are described here:

    http://docs.telerik.com/fiddler/Configure-Fiddler/Tasks/ConfigureDotNETApp http://docs.telerik.com/fiddler/Configure-Fiddler/Tasks/MonitorLocalTraffic

    Steps:

    Set address to service: http://localhost.fiddler:33321

    Set proxy in web.config

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