Install
Install following from Nuget Package Manager
Azure.StorageQueues
Add following reference…
using Azure.Storage.Queues;
using Azure.Storage.Queues.Models;
Add Message To Queue
QueueClient queue = new QueueClient(strConnectionString, strQueueName);
queue.SendMessage("test message"); // Default expiration of 7 days
Note:
Call to queue is not supported in Blazor Web Assembly. You will get this error message if you try to create a message.
System.Security.Cryptography.Algorithms is not supported on this platform.
Sources:
https://docs.microsoft.com/en-us/azure/storage/queues/storage-dotnet-how-to-use-queues?tabs=dotnet
https://docs.microsoft.com/en-us/dotnet/api/overview/azure/storage.queues-readme-pre
Comments