Tuesday, February 19, 2013

Azure Lessons Learned (Part III)

So you’ve been rocking along, adding new features to your Azure table service-based project, including new fields in your table entities, and everything works as it should – locally, using the emulator. Then you deploy to Azure, and you get this ominous gem:

<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<error xmlns="
   <message xml:lang="en-US">One of the request inputs is out of range.

You have to make sure that any new properties you’ve added to your table entities conform to table storage standards, available here: http://msdn.microsoft.com/en-us/library/dd179338.aspx


DateTime Values

Almost every time I have received the request input out of range exception has been when a DateTime property is added to an entity, but not defaulted correctly. Normally, if you declare a DateTime, but do not assign a value, it defaults to 1/1/0001, or DateTime.MinValue. However, Azure table storage does not support DateTime with values less than 1/1/1753. So, be sure to default your DateTime column:

this.MyNewDateTimeProperty = new DateTime(1753, 1, 1);

No comments:

Post a Comment