0
votes

I am trying to use web role example as shown in the following example, https://azure.microsoft.com/en-us/documentation/articles/service-bus-dotnet-multi-tier-app-using-service-bus-queues/. In step 9 I failed to continue due to unauthorized error. Can anybody point me what has gone wrong? Please see the images. Looks to me I have used the connection string properly. Thank you.

Following image shows connection string from azure portal.

enter image description here

Following image shows how do I use the connection string.

enter image description here

Following image shows what I get when running the web role according to the tutorial. enter image description here

2

2 Answers

0
votes

When you are creating the SharedAccessSignatureTokenProvider, you need to provide just the key and not the string you are providing. The endpoint is already set 2 lines above when you create the uri.

Your connection string will look something like this:

Endpoint=<<endpoint>>/SharedAccessKey:<<key>>

Just put the key in.

0
votes

After trying in many different ways to get rid of the error, finally I found why it was giving me that error. This was because there was space before and after the equal sign. "Endpoint = sb://mahbu... When I changed to "Endpoint=sb://mahbu..., then the error disappeared.