Ulana
Ulana

Reputation: 383

Fiddler not capturing requests from C# Windows Service

so I got a bit of a weird question. Fiddler captures traffic perfectly with test apps that I created. Than i moved this code to a new Windows Service that i created. For some magic reason I could not see any requests from Win Service in Fiddler. The code the same, Web API, URL the same... What the difference?

Upvotes: 0

Views: 1103

Answers (1)

Borislav Ivanov
Borislav Ivanov

Reputation: 5360

On startup, Fiddler registers itself as a system proxy, running on 127.0.0.1:8888 by default. Most of the processes use the system proxy for network access, but some don't, for example .NET applications and services, or the Mozilla Firefox browser.

To capture the traffic from such processes, you would need to change their proxy configuration settings. For example, for .NET Framework Window service, you could add the following to the App.config file:

  <system.net>
    <defaultProxy enabled="true">
      <proxy proxyaddress="http://127.0.0.1:8888" bypassonlocal="False"/>
    </defaultProxy>
  </system.net>

Upvotes: 1

Related Questions