简体   繁体   English

Windows Azure云服务-入口点

[英]Windows Azure Cloud Service - entry point

I have created a "Windows Azure Cloud Service" project in VS2012.2 with a MVC4 web role. 我在VS2012.2中使用MVC4 Web角色创建了“ Windows Azure云服务”项目。 When I run up the project it just gives me a web page. 当我运行该项目时,它只会给我一个网页。 I am trying to develop a web service back-end for my website so I want to be able to call web methods directly from my website which is also running in on Azure. 我正在尝试为我的网站开发Web服务后端,因此我希望能够直接从也在Azure上运行的网站调用Web方法。

When F5 my project it just gives me a website. 当F5我的项目时,它只是给我一个网站。 Should I be using a worker role instead of a web role? 我应该使用辅助角色而不是网络角色吗?

If you put your back-end web service along with your web role, then you can use it directly. 如果将后端Web服务与Web角色一起使用,则可以直接使用它。

If you put your service in a worker role, then you need to open an input endpoint on your worker role so that it can be connected from out side of azure. 如果将服务置于辅助角色,则需要在辅助角色上打开输入端点,以便可以从天蓝色的外部进行连接。

Or, you can create another website for your service and map to a virtual dictionary/application on your web role. 或者,您可以为您的服务创建另一个网站,并映射到您的Web角色上的虚拟词典/应用程序。

您可以同时使用两者,但是网络角色最简单,因为它可以为您设置所有内容。

在您的方案中最好使用Web角色,原因很简单,就是发布Web角色。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM