Steve Smith's Blog

Musings on Software and the Developer Community

Azure Table Storage Gotcha

Steve Marx gave a great talk on getting started with Azure at PDC.  You can watch the whole thing here and download his samples.  Once you download the Azure SDK (I’m using the January CTP) and ASP.NET MVC (I’m using the RC), you can get his stuff up and running without *too* much trouble.  However, one thing that took me a little while to figure out is that for some reason even when Azure Storage was running, the blog would error out saying that it couldn’t find the table it was looking for.  Of course, it was a little more cryptic than that – what it actually said was:

image

Resource not found for the segment ‘BlogEntryTable’.

I tried making sure the table existed and even added some rows to it manually and everything checked out fine.  I doublechecked my storage connection settings and that storage was running.  I read and reread the readme.  And then finally I looked at the Development Storage UI a little bit closer:

image

I had naturally run it using the SDK’s rundevstore.cmd script, and it was using its own database, not the one that I had set up for the Blog sample.  Clicking on Tools  - Table Service Properties allowed me to quickly change over to the blog tables (note – this only worked after running devtablegen Blog_WebRole.dll as described in the readme) let me update the Table storage provider to work against the correct instance.

image

With that out of the way, I was good to go until the next problem presented itself (see next post).

    kick it on DotNetKicks.com

Wednesday, 11 February 2009

Comments

 avatar

Philippe said on 01 Mar 2009 at 1:08 PM

Hi Steve,

Thanks for removing me this pain in the neck!!

I'm not sure I really understood what you wrote.. My first understanding was that you had the 'ServiceHostingSDKSamples' selected in the Development Storage and that after swicthing to you 'Blob_WebRole' database, everything went smoothly... Correct me if I'm wrong...

In my case I had my 'project_WebRole' database selected and got the same error than you. After switching my source to the 'ServiceHostingSDKSamples' and rerunning the application, it automatically recall the 'project_WebRole' source and went through... So I'm quiet puzzled!!

Do I missed something in your explanation?

Have a good day..