Deploying web role based on hosted WebCore

Source: Internet
Author: User

Based onHosted WebCoreDeploymentWeb role

Before introducing the principles of deploying web role on the windowsazure platform, Let's first look at a Windows azure project, which has only one ASP. NET web role.

Open the servicedefinition. csdef file, as shown below.

<? XML version = "1.0" encoding = "UTF-8"?>

<Servicedefinition name = "fulliisdemo" xmlns = "http://schemas.microsoft.com"

/Servicehosting/2008/10/servicedefinition ">

<Webrole name = "webrole1">

<Endpoints>

<Inputendpoint name = "endpoint1" protocol = "HTTP" Port = "80"/>

</Endpoints>

<Imports>

<Import modulename = "Diagnostics"/>

<Import modulename = "RemoteAccess"/>

<Import modulename = "remoteforwarder"/>

</Imports>

</Webrole>

</Servicedefinition>

Unlike the definition file we saw earlier, this file does not contain site nodes, but directly defines an HTTP input endpoint pointing to port 80 as the external endpoint address. Deploy the project on the Windows azure platform and add remote desktop support.

After deployment, connect to the role instance virtual machine through remote desktop. Go to the IIS Management page, as shown in Figure 8-41. In IIS, only the default site does not have the site corresponding to this Web role. In addition, the local file path pointed to by this default site is not the location of the Web role. So where is the Web role deployed?

 

 

Open the task manager of the VM and you will see a process named wawebhost.exe, as shown in Figure 8-42. This Web role is deployed in this process, not IIS. What is this wawebhost.exe?

 

 

 

 

In this example, the windowsazure project is servicedefinition. the csdef file format is based on SDK 1.2 and does not contain the site node in the configuration file. Therefore, when we deploy this Windows azure project, the Windows azure platform will deploy Web role in the old mode. In this mode, Web role will not be deployed to the IIS of the virtual machine, but will be deployed to a component named hosted web core, that is, the wawebhost.exe process shown in 8-42.

Hosted web core is a component that can host web sites, just like its name. The web site can be deployed in a process other than IIS. Hosted web core can complete the vast majority of IIS functions. Therefore, there is no difference between the website deployed on hosted web core and that deployed on IIS. However, it is precisely because hosted WebCore is only a subset of IIS functions that cannot fully implement IIS, including multi-site deployment, virtual directories, virtual applications, and Windows activation service ). This is why developers are running Windows Server
Before SDK 1.3, you cannot deploy multiple web role in one hosted service.

However, the deployment of hosted WebCore also facilitates the program. First, for the Windows azure platform itself, hosted web core is easier to control by Controller fabric because it is simpler and more independent. In addition, for webrole, the code and website code in webrole. CS both run under the same application domain. That is to say, the onstart, run, and onend codes of roleentry are all running together with the website code. In this way, the website code and webrole. CS Code call each other and other operations will be very convenient. Figure 8-43
Displays the status of deploying web role in hosted web core mode.

 

 

This article is excerpted from the book "Practical windows azure: Microsoft cloud computing platform technology details"

Book details: http://blog.csdn.net/broadview2006/article/details/6859004

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.