Category Archives: Azure

Quick and Easy – Safe Azure Queue Names

Silly but simple post.

As a follow-up to yesterday’s posting on “StorageException was unhandled” I thought I’d show the wee snippet of code I use to generate queue names:

 

        public static string GetRandomQueueName()
        {
            Guid g;
            g = System.Guid.NewGuid();
            return g.ToString();

        } 

Kind of silly in its simplicity but works well for me and has generated 100’s of safe queue names in the last couple of weeks.

</end>

undefinedSubscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin

Working with Azure Queues – “StorageException was unhandled”

I’ve been playing around with Azure queues for the last week or two and it’s been going smashingly.  Where were these things when I needed them back in 1990?

This article, in particular, is an excellent intro to queues for .NET programmers: http://www.windowsazure.com/en-us/develop/net/how-to-guides/queue-service/.  Using that article, I’ve been able to pull together a really nice bit of client-server logic that is so far reliable and just works with no grief.  Really – where was this stuff in 1990?

I did hit a small stumbling block right out of the gate, however.   As soon as I strayed from the specifics of the walk-through, I got hit with a StorageException and a “The remote server server returned an error (400) Bad Request.

image

It turned out that my queue name was off:

image

When I changed “OneQueueToRuleThemAll” to “onequeuetorulethemall” the StorageException went away.  I haven’t noticed any of the documentation calling this out but it may well do that.

Hope that helps someone.

</end>

undefinedSubscribe to my blog.

Follow me on Twitter at http://www.twitter.com/pagalvin