Gui*_*ira 5 azure azure-storage azure-table-storage
当我尝试在表存储中创建表(使用Azure本地存储模拟器)时,我收到错误"远程服务器返回错误:(400)错误请求."
表的名称是根据规则,所以可以发生什么?!
角色配置:
<ConfigurationSettings>
<Setting name="Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString" value="UseDevelopmentStorage=true" />
<Setting name="StorageConnectionString" value="UseDevelopmentStorage=true" />
</ConfigurationSettings>
Run Code Online (Sandbox Code Playgroud)
创建表方法:
CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
CloudConfigurationManager.GetSetting("StorageConnectionString"));
CloudTableClient tableClient = storageAccount.CreateCloudTableClient();
CloudTable table = tableClient.GetTableReference("people");
table.CreateIfNotExists();
Run Code Online (Sandbox Code Playgroud)
您使用的是哪个版本的SDK?如果要混合使用Storage Client库2.0和较旧的SDK(1.8之前版本),则模拟器存在问题.我也遇到了这个,并确保我使用的是StorageClient 2.0库和Azure SDK 1.8:
编辑:可能有办法将Storage API与Azure SDK混合使用,但这是一个简单的解决方案(解决方法).
| 归档时间: |
|
| 查看次数: |
6765 次 |
| 最近记录: |