C++ application for posting to a Azure Queue

Dec 4, 2014 at 2:56 PM
Howdy Folks,

I am looking at writing an application in C++ that will post to an Azure Queue. The issues I have is understanding the whole authentication and addressing.

I have written a C# application that can post and receive data from an Azure Queue but I have spent most of a day trying to understand how to do it in C++, and I am having issues finding documentation or forum posts that describe it in a simple level that I can understand.

In C# I have a used the examples from the MSDN libraries and my connect string is such:
string connectionString = "Endpoint=sb://namespace.servicebus.windows.net/;SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=123=";

Obviously in the above I have changed the namespace and acesskey to protect the innocent.

I have gone through the sample codes posted and have ones such as the Bing example working for getting a http_client GET working. What I don't understand is how to perform a POST and how to build the string up with the authentication.

Could someone bash me with a "read this document" or help out with pointers to code or examples of code?
Dec 4, 2014 at 5:32 PM
Hi OzzieOsborne,

I don't know all the details for handling authentication and connecting to Azure storage. There is a C++ Azure storage library from the Azure storage team that I think you should be using. They have a NuGet package and you can see their repository on GitHub. My recommendation would be to use their library directly.

Dec 8, 2014 at 5:00 PM
Thank you for your reply.

What I am trying to do is use the "send message" process defined on the below MSDN site:

The issue I have is around finding an example, or a simple explanation to how to create the authorisation token, the documentation simply states "Specifies a WRAPv0.9.7.2 token containing a SimpleWebToken acquired from ACS. Set to WRAP access_token=”{swt}”."

How this happens eludes me currently.

Kind regards
Dec 8, 2014 at 5:26 PM
Hi Ozzie,

We don't regularly work with Azure storage, this forum is for the C++ Rest SDK. I recommend you post your question to the Azure storage forum. They certainly should be able to answer any questions you have.