openlab / OGDI-DataLab

Open Government Data Initiative
http://ogdi.codeplex.com
Microsoft Public License
57 stars 17 forks source link

Unable to use Windows Azure Storage Emulator #3

Open SyntaxC4 opened 12 years ago

SyntaxC4 commented 12 years ago

This issue is caused by the how Data Container (Windows Azure Storage) urls are created by using a replacement token (http://{0}.table.core.windows.net).

When the Data Container is setup in the ConfigTool, a storagename and storagekey is provided. This is used to provide the application a Storage Location to retrieve the data loaded using the DataLoader.

This is a problem when providing the local storage values as http://devstoreaccount1.table.core.windows.net is not a valid storage account most likely doesn't have the accountkey of Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==

Here is how storage urls differ between production and the storage emulator:

Windows Azure Storage Url

Windows Azure Storage Emulator Url

More details found on msdn article, overview of running a windows azure application with local storage

SyntaxC4 commented 12 years ago

One potential fix for this is detecting if the url is a loop-back url as described in Episode 18 of Cloud Cover Show

A little bit about how System.Uri.IsLoopBack works