Azure 数据类型的本地结构和云处理之间的差异
最近,在尝试将存储从本地存储移动到云存储之后,我们花了一个下午的时间调试我们的 Azure 应用程序——这是将整个存储迁移到云的第一步。
我们遇到了一个问题,本地结构存储允许我们将未正确初始化的 DateTime 对象(初始化为 DateTime.MinValue 或“0”)存储到 Azure 存储表中,但云存储会抛出“值超出范围”将值提交到表时出现异常。
有没有办法让本地存储抛出与云相同的异常?
如果做不到这一点,有这些东西的清单吗?我找到了 MSDN 页面介绍了一些差异,但它没有列出类似这样的东西。
We recently spent the afternoon debugging our Azure application after trying to move the storage from the local store to the cloud storage -- the first step in moving the entire thing to the cloud.
We came across a problem in where the local fabric storage was letting us store improperly initialized DateTime objects (initialized to DateTime.MinValue, or "0") to an Azure storage table, but the Cloud storage would throw a "value out of range" exception when the value was committed to the table.
Is there a way to have the local storage throw the same exceptions as the cloud?
Failing that, is there a list of these things? I found an MSDN page on some differences, but it didn't list anything like this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
让本地存储和结构的行为与生产对应部分完全相同是不可能的。有完全不同的实现。
根据我们在 Azure 方面的经验,Lokad 采用的做法是:
其中一些抽象和类可在 Azure 开源项目中使用:
It is not possible to make local storage and fabric behave exactly like the production counterparts. There are completely different implementations.
The practice that we've adopted at Lokad based on our experience with Azure is:
Some of these abstractions and classes are made available in the open source projects for Azure:
我认为这是您想要的页面: http://msdn.microsoft.com /en-us/library/dd320275.aspx (它确实提到了您看到的差异。)
I think this is the page you want: http://msdn.microsoft.com/en-us/library/dd320275.aspx (It does mention the discrepancy you saw.)