REST: Add message to azure storage queue without base64 encoding?

Deadly 提交于 2019-12-05 17:46:18

I was getting format errors calling the AsString property because the message returned from the storage queue was, by default, base64 encoded.

The CloudQueue object has an EncodeMessage property that was set to true. Switched it to false and everything worked. Here's my code:

 CloudQueueClient queueClient = storageAccount.CreateCloudQueueClient();
 CloudQueue queue = queueClient.GetQueueReference(ClientQueueName);
 queue.EncodeMessage = false;
 CloudQueueMessage retrievedMessage = queue.GetMessage();

ClientQueueName being a string holding the name of my queue on Azure. I'm thinking that the property needs to be set to false in your case before sending as well.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!