简体   繁体   中英

Get CloudQueueMessage in Windows Azure worker role throws IO Exception in Azure Emulator

As can be seen from the image below I'm doing a pretty standard bit of code in a Worker Role to get a message from a queue in Azure Storage but it's throwing this IOException with text saying the specified registry key does not exist .

    CloudQueueMessage message = queue.GetMessage(TimeSpan.FromSeconds(30));

is the code that's causing the problem, sometimes it works fine or other times it doesn't. Very strange.

错误信息

Have you set your Local Config file Connection String to use UseDevelopmentStorage=true

From a quick google, this error can crop up as well if you have a mis-match between the Microsoft.WindowsAzure.StorageClient (v1.7) and the Microsoft.WindowsAzure.Storage (v2.0) libraries referenced in your application.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM