Windows Azure Storage 3.0.1.0与Azure Storage Emulator 2.2.0.0兼容问题
2013-12-28 06:45
507 查看
两天前,在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。所使用创建代码非常简单:
![](http://img.blog.csdn.net/20131228061904609?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvcXVpY2tuZXQ=/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
不应该是Windows Azure Storage APIs使用的问题。进一步检查给出的异常信息,发现其Response.StatusCode = BadRequest; Response.StatusDescription = The value for one of the HTTP headers is not in the correct format。在网上搜索了一下,已经有人报过类似的问题,但原因也是多种,比如:Table名字中包含非法字符的等。
此外,也有人提到有可能是Azure Storage API和Emulator不兼容的问题,于是将正在使用的Windows Azure Storage由3.0.1.0降到一个月前的版本 2.1.0.4,在安装了2.1.0.4后,同样的代码运行一切正常。看来确实是
Windows Azure Storage 3.0.1.0 和 Windows Azure Storage Enumlator 2.2.0.0 的兼容问题,解决的办法就是将Storage类库降级到较早的版本。不仅是3.0.1.0,在我的环境中Windows Azure Storage 3.0.0 也有类似与Storage Emulator的兼容的问题。
: 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();
不应该是Windows Azure Storage APIs使用的问题。进一步检查给出的异常信息,发现其Response.StatusCode = BadRequest; Response.StatusDescription = The value for one of the HTTP headers is not in the correct format。在网上搜索了一下,已经有人报过类似的问题,但原因也是多种,比如:Table名字中包含非法字符的等。
此外,也有人提到有可能是Azure Storage API和Emulator不兼容的问题,于是将正在使用的Windows Azure Storage由3.0.1.0降到一个月前的版本 2.1.0.4,在安装了2.1.0.4后,同样的代码运行一切正常。看来确实是
Windows Azure Storage 3.0.1.0 和 Windows Azure Storage Enumlator 2.2.0.0 的兼容问题,解决的办法就是将Storage类库降级到较早的版本。不仅是3.0.1.0,在我的环境中Windows Azure Storage 3.0.0 也有类似与Storage Emulator的兼容的问题。
相关文章推荐
- 简易客户数据库_链表实现_代码及解析
- 用公共头文件来实现个人提炼的功能模块的集中管理
- DP25 子集和问题 Subset Sum Problem @geeksforgeeks
- Binary Tree Level Order Traversal
- Python-核心编程-学习笔记
- poj3255 次短生成树
- DP24 最优BST Optimal Binary Search Tree @geeksforgeeks
- ThinkPHP的增、删、改、查
- 100层扔鸡蛋 2个及多个情况
- Windows下OpenSSL创建CA证书以及客户端和服务器端证书
- 图形和函数图像的绘制
- Java运行时的内存模型
- Java运行时的内存模型
- 网页设计方面,哪些中英文字体的组合能有好的视觉效果
- DP23 Bellman–Ford Algorithm @geeksforgeeks
- Google Code Jam Notes - Dragon Maze - Java
- Java中的null到底是啥?
- Java中的null到底是啥?
- 网页设计中最常用的字体
- MINESWEEPER题解