Working with Windows Azure Development Storage

Wednesday, 23 December 2009 18:06 by SyntaxC4

During the Development Cycle it is necessary to connect to a database to ensure that your data is getting stored in Windows Azure Storage Services. Microsoft was nice enough to give us this functionality out of the box so we don’t actually need a Windows Azure account before beginning development on an application. Of course you will need to Initialize your Development Storage Service on your development machine before you get going.  Once you’re done setting up the Development Storage Service you will need to configure the Development Storage in the ServiceConfiguration.cscfg file.  You will need to add the following ConfigurationSettings to each Role element in the ServiceConfiguration.cscfg [Please note that these are default values and may be subject to change].

   1:  <ConfigurationSettings>
   2:        <Setting name="DiagnosticsConnectionString" 
                      value="UseDevelopmentStorage=true" />
   3:        <Setting name="AccountName" value="devstoreaccount1" />
   4:        <Setting name="AccountSharedKey" 
                      value="Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsu
                             Fq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==" />
   5:        <Setting name="BlobStorageEndpoint" value="http://127.0.0.1:1000" />
   6:        <Setting name="QueueStorageEndpoint" value="http://127.0.0.1:1001" />
   7:        <Setting name="TableStorageEndpoint" value="http://127.0.0.1:1002"/>
   8:  </ConfigurationSettings>

Once you have these configuration settings in place you will be ready to interact with the Windows Azure Development Storage Service on your Development Machine.  Stay tuned for my next blog Series which will describe the different between Blob Storage, Queue Storage, and Table Storage and how you will go about interacting with the different storage spaces.

For more information please refer to:

Comments

December 22. 2009 22:40

Actually, the following are sufficient to use Development Storage:

<ConfigurationSettings>
  <Setting name="DataConnectionString" value="UseDevelopmentStorage=true" />
  <Setting name="DiagnosticsConnectionString" value="UseDevelopmentStorage=true" />
</ConfigurationSettings>

You no longer need to provide the account settings and endpoints.

You can even use CloudStorageAccount.DevelopmentStorageAccount and not even bother with the DataConnectionStringSetting in the config file.

Neil Mackenzie

Add comment




  Country flag

biuquote
  • Comment
  • Preview
Loading



About SyntaxC4:

  • Cory Fowler
  • Guelph, Ontario
  • English
  • SyntaxC4

SyntaxC4 Tweets:

Posts by Date:

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

Archive:

Advertisements:

Tag Cloud:

Favourite Publishers:

Apress Daily Deal
Apress Daily Deal

Blog Roll: