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.
- Install Fiddler and choose the ‘Built for .NET 4” version
- Run Fiddler and choose (from the menu) Tools, Fiddler Options… Check these boxes in the HTTPS tab of the resulting dialog (and hit OK):
- Set these options in the Connections tab and then hit OK:
- 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):
NOTE: To undo the proxy host registration use:
prefs remove fiddler.network.proxy.registrationhostname HostName where HostName is the name of your desktop computer
- 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
- CLOSE THE PHONE EMULATOR
- 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
- 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:
Let me know if you found this handy!
Follow the Windows Store Developer Solutions team on Twitter @wsdevsol.