简体   繁体   中英

Send message to azure queue Microsoft.ServiceBus.Messaging.MessagingEntityNotFoundException

I'm trying to follow along with this tutorial https://azure.microsoft.com/en-us/documentation/articles/service-bus-dotnet-multi-tier-app-using-service-bus-queues/ on azure queues but I opted for using an MVC app instead of the web role. I have everything working up to step 9 of the create a web role where it says you should now be able to hit submit and watch the message count increase of your queue on page.

Instead I get An exception of type 'Microsoft.ServiceBus.Messaging.MessagingEntityNotFoundException' occurred in Microsoft.ServiceBus.dll but was not handled in user code

Additional information: 40400: Endpoint not found.

on the step 8 line when it send the message to the queue. It detects the queue as being there or it wouldn't skip over the check for is it created so I have to think it's some kind of access issue.

Can someone please assist me?

So funny enough I had all the code correct as per the tutorial but after checking the error definition metadata it says that entity not found usually means it can't find the queue. So as a shot in the dark I looked at this line

OrdersQueueClient = messagingFactory.CreateQueueClient( "OrdersQueue");

and guessed that maybe the OrdersQueue was actually supposed to match the name of my queue which I overlooked during my first go through. So if you get entity not found make sure you check your connection string and queue name in the azure portal. Hope this is helpful.

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