Tag Archives: Development

Sniffing Azure Storage Explorer traffic

A friend asked a question about looking at how Azure Storage Explorer makes its API calls to Azure using something like Fiddler.

The issue with just firing up Fiddler and watching traffic is that to decrypt HTTPS traffic fiddler installs a root certificate so that SSL is terminated in Fiddler first so that it can show you the decrypted payloads back and forth etc…

That is normally fine with apps that use the standard WinINET libraries etc… to make HTTPS calls (like chrome). However, Azure Storage Explorer an Electron app using NodeJS and doesnt use these. Node also handles root CAs a bit differently and a long story short is that it doesn’t by default trust Fiddlers Root Cert that it installs. This means that HTTPS calls fail with a “unable to verify the first certificate” error.

Setting up Fiddler

First you need to set up Fiddler to decypt HTTPS traffic. You do this in Fiddlers options under Tools > Options > HTTPS.

This will prompt you to install a certificate that Fiddler uses to terminate SSL in Fiddler so it can show you the decrypted traffic.

One You have completed this you need to export the certificate Fiddler installed so that you can set up Storage Explorer with it.

  1. Run MMC.exe
  2. File > Add Remove snap in
  3. Pick Certificates, when prompted choose “Computer account” and “Local computer”
  4. Navigate to Certificates > Trusted Root Certificates > Certificates
  5. Find “DO_NOT_TRUST_FiddlerRoot” certificate
  6. Right Click > All Tasks > Export  
  7. As you go through the wizard choose “Base-64 encoded X.509 (.CER)” for the file format
  8. Save it your desktop or somewhere you will be able to find it later

Setting up Azure Storage Explorer

First up you need to configure Azure Storage Explorer to use Fiddler as a proxy. This is pretty straightforward.

In Storage Explorer go to the Edit -> Configure Proxy menu and add and 8888 (fiddler defaults). Note: Not authentication should be used.

Now Storage Explorer will use Fiddler … however, you will start getting “unable to verify the first certificate” errors as Storage Explorer still doesnt trust the root certificate that fiddler is using for SSL termination.

To add the Fiddler certificate go to the Edit > SSL Certificates > Import Certificates. Pick the .cer file you saved out earlier. Storage Explorer will prompt you to restart in order for these to take effect.

Now when you start using Storage Explorer you should start seeing its traffic in Fiddler and in a readable decrypted state like below.

Now you can navigate around and do various operations and see what and how Azure Storage Explorer is doing it.

Happy Coding.

Why, I think, My Trips has high a customer rating…

As you may, or may not, know I build a fairly well used TripIt.com Windows Phone application called My Trips.  It all started as a side project when I switched from an iPhone to Windows Phone & there wasn’t a tripit app out at the time.image

Well as time has gone on (over a year in the marketplace now), it’s had really good reviews (currently 4.5 out of 5 stars).  And I have a theory on why … (other than it being a kick ass app of course!)

I get very little negative feedback in the review system.  Why is this?  Well I think its because I highly encourage My Trips users to engage with me when they have any questions, feedback or concerns.  How do I do that?  A couple of different ways that are not rocket science:

  • Contact info in the About page in My Trips (email, web, twitter)
  • Twitter comments & replies to people moaning about the official TripIt.com app on Windows Phone.
  • Automated feedback if something bad happens in the app.

The third one is really what I think has made ALL the difference in My Trips.  Here is what I mean by “Automated Feedback”.

If something bad happens in My Trips and my code doesn’t cope with it (poor coding on my part) then I catch the Exception in the Unhandled Exception handler and do something with it.

  1. Log all the exception information to Isolated Storage for the record
  2. Prompt the user with a Message Box that says “Something bad happened :(“  and “Would you like to report this problem so we can fix it?”
  3. If they click “OK” then it creates an email with things like a stack trace, and other environmental information in it.  All they have to do it click send.

Most of the time a user clicks “OK” and sends me a bug report (not often any more … but in the beginning I got quite a few).

This means two things happen…

Firstly, they don’t go running to the Marketplace and leave a bad review because they have already sent feedback (to me).

Secondly, I take the bug reports REALLY seriously and I try to fix them ASAP.  I reply and tell them I am looking into it & once I have found and fixed it I reply and say “Thanks again for reporting the issue” and that it will be fixed in the next update.  They feel good because the problem is fixed and that someone listened to them.

So what the real moral of the story here? … actively engage your users.  Especially if something bad happens to their experience in your application.

Its easy to do and I would urge everyone who writes apps to do something like this.

@toddbaginski also put me onto another service called bugsense that helps you record issues and errors in much the same way.  They have a Windows Phone plugin too!

This is the out of the box unhandled Exception Handler that you need to plug code into in App.cs:

// Code to execute on Unhandled Exceptions
private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)

Thanks and happy coding…