Archive for March, 2009

Connecting to Azure Table Storage

After you finally manage to get Table Storage working (see nice tutorial here) you’ll try to deploy it to your staging environment. That means you need to change the configuration.

There are three settings to use: AccountName, AccountSharedKey and TableStorageEndpoint.

Unfortunately, the values you need for them aren’t what you would naturally expect.

AccountName: This isn’t your account name, but the name of your storage account. (I guess that’s why it has to be a unique name at the time you create it.) On the summary page of your storage project you will only see the value you need in the list of endpoints. It’s the first part of each of the three domain names.

AccountSharedKey: This is the Primary Access Key as found in the summary page of your storage project in the developer portal.

TableStorageEndpoint: This isn’t the endpoint as described in the summary page, but rather a shortened version. Just lop off the AccountName part of the endpoint you use as described in the summary page. That should give you something like

For more information see this article on MSDN.

It is so time-consuming to get right, that it really makes sense to follow the advice in the documentation. First, test locally. Then test your local hosted app using the live Storage account. Finally, load your app and test that in the staging environment.

Saying that, I haven’t yet managed to get the second scenario to work. It just crashes on start-up. (Help!)

No Comments

Learning Windows Azure

I started to learn how to use the Azure Cloud Service from Microsoft this week. Currently it’s still in Tech Preview stage. Unfortunately you can tell that from the SDK documentation.

Here’s some useful links to get you going:

  1. Screencasts:
    These are quite basic, but trust me, you need them to be basic to get you started.
  2. SDK:
    Contains CHTM-style documentation, tools and samples. Don’t expect too much from the docs; they explain enough to get you confused, and then have an API reference. You need to unzip the samples and get into them to start understanding how everything fits together.
  3. Visual Studio Templates:
    This gives you a set of project and item templates which you can use to create and publish Azure applications. Don’t worry about the extra projects it adds to a solution, or the config files. You will learn more about them later.
  4. The Azure developer center on MSDN:

Assuming you already registered for Azure, that’s all you really need to get started.

The biggest problem I found at first was deploying an app. Once you have generated an Azure project in Visual Studio, you expect to be able to publish it from Visual Studio too. Unfortunately you can’t, and it takes a little more effort. I’ll write more about that in another post.

I also needed help trying to understand what to focus on to get started. So here’s a big tip: Ignore .Net Services, Live Services, and SQL Data Services. They aren’t part of Azure per se. You can come back to them later. First you just need a hosted project and some storage – either blob storage or table storage. (There’s also queue storage, but I bet no one will want to use that straight away – it’s for tying two apps together, which no one will want to do at first.)

I recommend you download the SDK and the Visual Studio templates, create yourself a “Web Role” project (which is really the equivalent of an ASP.Net project), and work on that. Then move onto table and blob storage. You can use the screencasts to help you.

Good luck getting started!

No Comments