Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to configure Fiddler to intercept HTTP calls from a Windows service?

Tags:

We're in the process of replacing an old (5+ years) Windows service application built with VS2005 that makes an HTTP GET call. There are several things that make this difficult (such as the web server is on the customer's network and we can't connect directly to it) and, unfortunately, we'd prefer not to take down the running system to replace it with a WinForm version that can be monitored by Fiddler. The new code appears to be doing everything correctly, but, alas, it is failing to authenticate.

Is there a way to configure Fiddler (2.2.9.1) to intercept HTTP calls from a Windows service?

like image 510
Mike Chess Avatar asked May 27 '10 00:05

Mike Chess


People also ask

How to Setup proxy in Fiddler?

Set Remote Machine Proxy SettingsStart Fiddler Classic on the Fiddler server (the machine that will capture the traffic). Click Tools > Options. Ensure Allow remote clients to connect is checked. On the other machine, set the proxy settings to the machine name of the Fiddler server at port 8888.

How do I enable Fiddler trace in Internet Explorer?

Click Tools > Monitor with Fiddler > Use Fiddler automatically to configure with FiddlerHook, or. Click Tools > Options > Advanced > Network > Settings > Use System Proxy Settings.

What port does Fiddler listen on?

Fiddler listens on port—Defines the port that Fiddler Everywhere uses to listen for web traffic. The default port is 8866. Act as a system proxy on startup—Controls whether Fiddler Everywhere will be registered as the system proxy during startup.


1 Answers

Codeka provided a clue to get me going in the right direction. The piece that was still missing was how to get the proxy configured. The <appname>.exe.config needs <defaultProxy> specified to have a section like the following added:

<configuration>      <!-- The `<system.net>` element is an immediate child of `<configuration>` but can appear anywhere in app.config -->     <system.net>         <defaultProxy enabled="true">             <proxy proxyaddress="http://127.0.0.1:8888" bypassonlocal="False"/>         </defaultProxy>     </system.net>  </configuration> 

Once this was done the Windows service's http traffic started flowing through Fiddler.

like image 164
Mike Chess Avatar answered Oct 26 '22 07:10

Mike Chess