I am working on web role in the Azure cloud service. Basically my web role is an MVC application and how can I make the controller in MVC communicate with the webrole.cs class. For example, in the run() method in webrole.cs I have received a message and I want to pass it to the MVC controller, how can I do that? Any help is appreciated!
Asked
Active
Viewed 147 times
0
-
2show your example code please – teo van kot Jul 17 '15 at 15:01
-
Same question asked 2 days ago by him: http://stackoverflow.com/questions/31433461/how-to-change-the-view-of-an-mvc-in-the-web-role – Adam Jul 17 '15 at 15:31
1 Answers
0
You'd better use a azure service bus queue to do that. Send a message on Run, and take the message from queue in your mvc app.

Thiago Custodio
- 17,332
- 6
- 45
- 90
-
Can I take the message from queue in the controller class? How can I do that? – de li Jul 17 '15 at 15:46
-
yes you can. https://azure.microsoft.com/en-us/documentation/articles/service-bus-dotnet-how-to-use-queues/ – Thiago Custodio Jul 17 '15 at 18:41
-
Thanks for your reply. However, I think I suppose to receive the message in webrole.cs and pass it to the controller. Is this possible? – de li Jul 17 '15 at 21:14