两天前,在Visual Studio 2013上通过NuGet安装了 Windows Azure Storage 3.0.1.0 客户端类库,该版本是12月份刚刚更新的,如下图所示。 但是在调用 CreateIfNotExists() 通过本地的 Windows Storage Emulator 2.2.0.0 创建Windows Azure Table时,总是抛出异常 : A first chance exception of type 'Microsoft.WindowsAzure.Storage.StorageException' occurred in Microsoft.WindowsAzure.Storage.dll. Additional Information : The remote server returned an error : (400) Bad Request。所使用创建代码非常简单:
// Creates Changeset table if not exists
var client = StorageAccount.CreateCloudTableClient();
table = client.GetTableReference(tableName);
table.CreateIfNotExists();

在使用Visual Studio 2013和Windows Azure Storage 3.0.1.0时,尝试通过Azure Storage Emulator 2.2.0.0创建Table时遇到(400) Bad Request异常。问题源于API版本不兼容。降级到2.1.0.4版本后,问题得到解决,确认为版本之间的兼容性冲突。解决方案是使用与Emulator兼容的旧版Storage类库。
最低0.47元/天 解锁文章
147

被折叠的 条评论
为什么被折叠?



