When Fiddler launches and attaches, it adjusts the current user’s proxy settings to point at Fiddler, running on 127.0.0.1:8888 by default. That means that traffic from most applications automatically flows through Fiddler without any additional configuration steps.
However, sometimes you might want to capture traffic running in a different user account – for instance, you may want to capture web service calls from an ASP.NET page to a web service running on a different machine, or you might want to debug the traffic from a Test Studio Load Test agent, which runs under a service account.
Fortunately, if you’re an administrator, it’s pretty easy to get .NET Services to point at Fiddler. Simply open the machine.config file and add a new defaultProxy setting that points at Fiddler:
1. Start Fiddler.
2. Launch Notepad elevated (as an Administrator).
3. Open machine.config in the folder C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config.
Note that if you are debugging a 64bit service (like ASP.NET) you will want to look in the Framework64 folder instead of the Framework folder. Similarly, if you are using a .NET version prior to 4.0, you will need to adjust the version part of the path.
4. Add the following XML block as a peer to the existing system.net element, replacing any existing defaultProxy element if present:
<!-- The following section is to force use of Fiddler for all applications, including those running in service accounts -->
enabled = "true"
useDefaultCredentials = "true">
<proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:8888" usesystemdefault="false" />
It should look like this:
5. Save the file.
6. Restart the services. Most services are restarted using the Services MMC applet, but for Test Studio, you can use the Start/Stop buttons in the Test Studio UI:
After this configuration change is made, traffic from services should begin to flow through Fiddler:
When you’re done debugging, be sure to revert your changes to machine.config and restart the services. If you forget to undo your changes, you’re likely to find that all of your services can no longer reach the network the moment that Fiddler is shutdown.
Eric Lawrence (@ericlaw) has built websites and web client software since the mid-1990s. After over a decade of working on the web for Microsoft, Eric joined Telerik in October 2012 to enhance the Fiddler Web Debugger on a full-time basis. With his recent move to Austin, Texas, Eric has now lived in the American South, North, West, and East.
Copyright © 2017, Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved.
Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.