When working with Windows Azure Mobile Services it is handy to decrypt HTTPS traffic from the Phone Emulator to see what traffic is being passed to your Mobile Service.  Here is how to hook Fiddler up and get it to work with the Emulator.

  1. Install Fiddler and choose the ‘Built for .NET 4” version
  2. Run Fiddler and choose (from the menu) Tools, Fiddler Options…  Check these boxes in the HTTPS tab of the resulting dialog (and hit OK):
    image
  3. Set these options in the Connections tab and then hit OK:
    image
  4. In the command windows on the bottom left corner of Fiddler type: prefs set fiddler.network.proxy.registrationhostname HostName where HostName is the name of your desktop computer (in my case jsanderscarbon):image
    NOTE:  To undo the proxy host registration use:
       prefs remove fiddler.network.proxy.registrationhostname HostName where HostName is the name of your desktop computer
  5. Close and restart Fiddler.  When Fiddler restarts you may get a firewall warning (in fact you should if this is the first time you have done this) so make sure you let all 3 types of networks through your firewall for Fiddler.  Note: you don’t need to capture, you will still see the traffic that is proxied through it from the emulator so you can toggle the capture off by hitting F12. Go back to the dialog in Step 3 and look up and save the ‘Proxy registration address’  (in this dialog it is ‘jsanderscarbon:8888) Note: This will not appear in this dialog until you complete all the previous steps
  6. CLOSE THE PHONE EMULATOR
  7. Restart the emulator and open the Internet Explorer Browser, then type in http:// followed by the ‘Proxy registration address’ followed by /FiddlerRoot.cer (in this dialog it is ‘http://jsanderscarbon:8888/FiddlerRoot.cer’) then hit OK (TIP:  Hit the PageDown key on your computer keyboard and you can type in text fields of the emulator
    image
  8. You should connect to Fiddler and get a screen like this, Hit ‘install’ accept any prompts and hit ‘ok’

Now you should be able to capture traffic to and from your Windows Azure Mobile Service in the Windows 8 Phone Emulator!

Important Note: If your machine is joined to a domain, you will need to get an exception from your IT Admin. IPSec prevents incoming connections from non-domain joined machines (the phone emulator) unless there is a policy that allows it. 

Windows Phone 8.1 Emulator needs more configuration:

I will update my blog below for WP8.1… But this works

http://stackoverflow.com/questions/23462697/windows-phone-8-1-emulator-not-proxying-through-fiddler

 

Let me know if you found this handy!

Follow the Windows Store Developer Solutions team on Twitter @wsdevsol.