When I try to create a table in Table Storage (using Azure Local Storage emulator) I get the error "The remote server returned an error: (400) Bad Request."
The name of the table is according the rules, so what can be happening?!
Role Configuration:
<ConfigurationSettings>
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />
<Setting name="StorageConnectionString" value="UseDevelopmentStorage=true" />
</ConfigurationSettings>
Create table method:
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
CloudConfigurationManager.GetSetting("StorageConnectionString"));
CloudTableClient tableClient = storageAccount.CreateCloudTableClient();
CloudTable table = tableClient.GetTableReference("people");
table.CreateIfNotExists();
Azure table storage is deprecated, but still in use by some organizations. Many organizations are still using Azure table storage because it is easy to use, and it has a lot of features. However, as Azure table storage becomes more difficult to use, organizations may want to look into alternatives, such as Cosmos DB.
An entity in Azure Storage can be up to 1MB in size. An entity in Azure Cosmos DB can be up to 2MB in size. Properties: A property is a name-value pair. Each entity can include up to 252 properties to store data.
What version of the SDK are you using? If you are mixing the Storage Client library 2.0 and the older SDK (pre 1.8) the emulator has a problem. I ran into this as well and made sure I was using the StorageClient 2.0 library and the Azure SDK 1.8:
http://social.msdn.microsoft.com/Forums/en-US/windowsazuredata/thread/b1b66cc0-5143-41fb-b92e-b03d017ea3c1
Edit: There maybe ways to get it work with mixing the Storage API with Azure SDK, but this is an easy solution (workaround).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With