Jeff Sanders Technical Blog

I am a Microsoft employee that has worked on all aspects of the Web Stack for a long time. I hope these blogs are useful to you! Use this information at your own risk.


<< Go Back

How To Use Fiddler With Windows Azure Mobile Services Net Preview Backend

- 06 Mar 2014

I was using the Windows Azure Mobile Services .NET (Preview) Backend and wanted to see the HTTPS traffic.  I found the best way is to use Fiddler and modify the application so it will send traffic through the Fiddler proxy.  By default Fiddler will not catch the localhost traffic so you need to do a little trick to get IIS Express (Cassini) to work with this setup (ref: http://docs.telerik.com/fiddler/observe-traffic/troubleshooting/notraffictolocalhost ).

Set up Fiddler like you normally would to capture all HTTPS traffic and modify your application code to point to localhost.fiddler instead of local host.  For example, in my C# client project I changed this:

  sealed partial class App : Application
    {
        // This MobileServiceClient has been configured to communicate with your local
        // test project for debugging purposes. Comment out this declaration and use the one
        // provided below when you are done developing and deploy your service to the cloud.
        public static MobileServiceClient MobileService = new MobileServiceClient(
            "http://localhost:51039"
        );

To this:

  sealed partial class App : Application
    {
        // This MobileServiceClient has been configured to communicate with your local
        // test project for debugging purposes. Comment out this declaration and use the one
        // provided below when you are done developing and deploy your service to the cloud.
        public static MobileServiceClient MobileService = new MobileServiceClient(
            "http://localhost.fiddler:51039"
        );

Now I get my traffic in the local scenario! 

I hope this helps!  Drop me a note if you found this useful!

Jeff

<< Go Back