How to capture Windows 8 app traffic with Fiddler

by Leon Cullens 13. september 2013 21:10

One of my favorite development tools is Fiddler. It's a really useful tool that allows you to see what requests your app is performing, and you can create new requests that can interact with your app/API. Here's how you can get it working with Windows 8 apps, and why it's useful.

Why is it useful?

Currently I am working on a Google Analytics app for Windows 8. That involves performing a lot of HTTP requests to the Google API. Because you'd want to write your app as efficient as possible, and because you don't want to waste your API quota, it's important to monitor what requests your app is performing so you can optimize them by caching data, by bundling requests or by lazy loading data when it's needed. With Fiddler you can capture these requests, and more important: you can exactly see what data they are returning, so you won't have to go through your debugger to inspect the returned data. Another benefit is that you can create custom requests to test out any requests before you implement them in your app.

 

The problem

By default you can't monitor requests made by Windows 8 apps (at least not in Windows 8.1, not sure about 8.0), especially not HTTPS traffic. For security reasons, Windows 8 blocks apps from sending network traffic to the local computer, meaning that the traffic won't run through your Fiddler proxy and thus cannot be captured. Luckily, there's an easy fix though.

The solution

In order to monitor traffic by Windows 8 apps, you need to start Fiddler and click on Win8 Config:

This will open a new window where you can exempt apps from this restriction. To do this, select your app (or all apps) and press Save Changes:

After you've done that, you're good to go.

Monitor HTTPS traffic

If your requests are performed using HTTPS, there's a little bit more to do, you need to enable HTTPS decryption so that fiddler can decrypt your requests. I needed this for my Google Analytics app because all requests to Google Analytics are performed using HTTPS. To enable HTTPS decryption, go to Tools -> Fiddler Options -> HTTPS. You'll see this:

Make sure that you check the Decrypt HTTPS traffic checkbox. Press OK, and accept any certificates. After that, you'll be able to monitor everything there's to monitor in your Windows 8 apps!

Tags: , ,

Windows 8

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

about

Name: Leon Cullens
Country: The Netherlands
Job: Software Engineer / Entrepreneur
Studied: Computer Science 
Main skills: Microsoft technology (Azure, ASP.NET MVC, Windows 8, C#, SQL Server, Entity Framework), software architecture (enterprise architecture, design patterns), Marketing, growth hacking, entrepreneurship

advertisements

my apps