Search code examples
c#fiddler

How can I enable Fidder capture for a process running as a different user?


I have a process running as a different user on my machine that I want to capture HTTP (and HTTPS) traffic with. When I start Fiddler, it only captures processes from my user account.

I'm interested in doing this for both applications I build and applications that I do not have the source code for, as well as instructions for native and .NET applications.


Solution

  • From the Fiddler docs:

    C# Applications (you have a few options):

    1) Edit the machine.config file:

    <!-- Force Fiddler for all .NET processes, including those running under service accounts -->  
    <system.net>
     <defaultProxy>
      <proxy autoDetect="false" bypassonlocal="false" proxyaddress="http://127.0.0.1:8888" usesystemdefault="false" />
     </defaultProxy>
    </system.net>
    

    2) Edit the program's app.config file using the settings above

    3) Specify the proxy on a WebRequest object:

    objRequest = (HttpWebRequest)WebRequest.Create(url);
    objRequest.Proxy= new WebProxy("127.0.0.1", 8888);
    

    Native Applications (Windows Vista or above):

    For Windows 7 and earlier, use the netsh that matches the architecture of your application (32 or 64 bit)

    netsh winhttp set proxy 127.0.0.1:8888
    

    When done, you can clear the proxy by:

    netsh winhttp reset proxy