如何通过从webrole.cs对象MVC的控制器?

如何通过从webrole.cs对象MVC的控制器?

问题描述:

我的工作中的Azure云服务Web角色。基本上我的Web角色是一个MVC应用程序,我怎么可以在MVC控制器与webrole.cs类通信。例如,在webrole.cs的run()方法我收到一个消息,我想将它传递给了MVC的控制器,我该怎么办呢?
任何帮助AP preciated!

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!

您最好使用蔚蓝服务总线队列做到这一点。发送运行信息,并采取从队列中的消息,在你的MVC应用程序。

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.