简体   繁体   中英

How to capture WPF localhost traffic using Fiddler/RawCap/Wireshark?

I have a working WPF application running. It is pointing to my local IIS service. I'm trying to capture the traffic data and below are the ways i have tried so far but no luck.

1) fiddler

try to add localhost.fiddler to the endpoint but not working. can't even see the service page by using browser.

在此处输入图片说明

Added the system.net in web.config OR machine.config and still not working.

<system.net>
  <defaultProxy>
    <proxy  proxyaddress="http://127.0.0.1:8888" />      
  </defaultProxy>
</system.net>

I can see fiddler capturing https://localhost:8443/xxxx.svc if i browse it using chrome. Why I can't see the traffic when I run my WPF application?

Below is my endpoint config

在此处输入图片说明

2) RawCap

I have enable the loopback interface in windows 10 and run rawcap I get bunch of log from .pcap file and I'm not sure why is it capturing so many things....I can't find any related traffic log that coming from my WPF application 在此处输入图片说明

Below is the exception i get when hitting the service from my application

在此处输入图片说明

Can it be due to my local Certificate?

I have tried another approach which is using IISExpress which bypass the certificate using http://, but my fiddler still not capturing anything from my WPF application.

I was able to capture server trafic (from w3wp to distant REST service) using this on Windows 10:

Run IIS Pool at your own name.

Steps: IIS -> App Pool -> Your pool -> Advanced parameters -> Identity -> User Account Enter your username / password of your local account. *** Using "Microsoft account" of windows 8+, you need to enter your name like this: "MicrosoftAccount\\myemail@mydomain.com" (Works on Win10 update 1511) You may get a "keyset does not exist" error message.

And now, I can see all my client-server and server-server traffic!

with fiddler, remove the proxy config and use http://machine/xxx in the wcf config files for the endpoint in IIS. This works...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM