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 http://table.core.windows.net.
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!)