Freigeben über


How to use Fiddler with Windows Azure Mobile Services .NET (Preview) Backend

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: https://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(
            "https://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(
            "https://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

Comments

  • Anonymous
    March 07, 2014
    From my experience, even localhost. is more than enough.  It works.