Friday, December 23, 2011

Queue names restrictions on Azure Storage

We got the exception “One of the request inputs is out of range” using a queue to link web and worker roles on Azure. Of course my little prof-of-concept test with code copy-and-pasted from the Azure Tranning Kit ran ok, but the (almost) same code on my app did not. After some time I noticed that the exception was generated when I used upper-case letters on the queue name. Well, the rules for naming queues on Azure are here, but basically they are:

  1. Names can be made of letters, digits and the dash char (-).
  2. First and last chars must be letters ou digits. Consecutive dashes are not allowed.
  3. All letters must be lower case. (Come on, man. You have this kind of restriction and it’s not documented on the API help? Put it in the CloudQueueClient constructor, or in CloudQueueClient.GetQueueReference(), which receives the name of the queue, or at least in CloudQueue.CreateIfNotExists(), since this method creates the queue… :-P)
  4. The queue name length must be between 3 and 63 chars.

Wednesday, July 20, 2011

ReportViewer: Another Reason to “Sys.ArgumentNullException: Value cannot be null. Parameter name: panelsCreated[..]”

If you are stuck with a blank screen when using the ReportViewer control that ships with Visual Studio 2010, check if you provided values for all the parameters in the report. We created a report using {CTRL+C CTRL+V} on an existing report, and the second report used only 3 of the 4 parameters on the original report. We did not provide any value to the last parameter, and it had no default value configured, so the ReportViewer rendered a blank panel on the web form, and generated the following JavaScript error:

Sys.ArgumentNullException: Value cannot be null. Parameter name: panelsCreated[1]

When we edited the report's RDLC file (I could not find the "Report Parameters" menu option that should be under the “Report” menu in Visual Studio, so I opened the RDLC file using Visual Studio XML Editor), and took off the unused parameter defition, the ReportViewer rendered ok. Thanks to this post for pointing me to the right direction.