Building a Simple Azure Blob Tree Viewer With Azure StorageClient API

Understanding how Azure Blob Storage can be used to simulate directory structures is a little tricky to say the least.  I’ve got a long forum thread on the Windows Azure Community site  now discussing the details.  As always, Steve Marx has been a big help here with a bunch of code. Steve’s got a great blog where he provides lots of examples and insights.  Neil Mackenzie has also contributed here to getting to the answer.

Just so we now have an example, I’ve put together a simple windows form app that let’s you set a few variables in your app.config to point at your azure storage and container, let you view your app as a tree as well as see the code how it can be done.  I have not commented the code much, just thought it would be good to get it out there.  The running application shows you the data as follows.


So, for the details, I’m pasting below the meet of the code.  Basically, it does what you would expect in terms of iterating through the directories recursively to build the list.  Again, just set your parameters in your app.config as follows:


and you can run it for yourself and see how it goes.

I’m pasting some code below, as well as including the project source code.  The main reason I’m pasting the code is so that the search engines can find it better.  It’s really just easier to download the project and load it into Visual Studio 2010 and run it yourself.


Visual Studio 2010


Good Luck, and hope this helps!

Visual Studio 2010

About Peter Kellner

Peter is a software professional specializing in mobile and web technologies. He has also been a Microsoft MVP since 2007. In addition, he’s a multi-course video author at Pluralsight. To read more about Peter Kellner and his experience click here. For information about how Peter Kellner might be able to help you with your project click here.

Follow me:


  1. Luciano Geyman says:

    Excellent goods from you, man. I’ve understood your stuff previously too and you are just too excellent. I actually like what you’ve acquired here, really like what you’re saying and the way in which you say it. You make it entertaining and you still take care of to keep it smart. I can not wait to read far more from you. This is actually a terrific website.

  2. I do love the manner in which you have presented this concern and it does indeed provide me personally some fodder for thought. However, because of everything that I have seen, I simply just trust as the actual feed-back pack on that individuals remain on issue and don’t start upon a tirade regarding the news du jour. All the same, thank you for this excellent point and although I do not go along with it in totality, I regard your perspective.

  3. Had been googling for a while before I came across this. Just what I was after – Cheers…

  4. Wow that was unusual. I just wrote an very long comment but after I clicked submit my comment didn’t appear. Grrrr… well I’m not writing all that over again. Anyhow, just wanted to say fantastic blog!

  5. Scott Abercrombie says:

    Thanks so much! I was struggling with this….


Get every new post delivered to your Inbox

Join other followers: