Windows Azure Getting Started teaching series (i): Creating the first Webrole program

Source: Internet
Author: User
Keywords nbsp; first we nbsp;
Tags aspx click create creating how to html http installed

Starting today we will launch a series of Windows Azure introductory teaching articles. In the first tutorial, we will learn how to create a webrole program (C # language) in Visual Studio 2008 SP1.

Before you begin your study, make sure that you have installed on your machine:

Windows Azure Tools for Microsoft Visual Studio (November 2009)

http://www.microsoft.com/downloads/details.aspx?FamilyID=6967ff37-813e-47c7-b987-889124b43abd&displaylang=en

Windows Azure Software Development Kit (November 2009)

http://www.microsoft.com/downloads/details.aspx?familyid=772990DA-8926-4DB0-958F-95C1DA572C84&displaylang= En

Step One: Create solutions and projects


Open Visual Studio 2008 SP1 with Administrator privileges, click File, select New, and click the Project button:


In the pop-up window, follow the image below, select the Windows Azure Cloud service template, name the project Firstwebrole, and click OK to create the project:


After the pop-up window appears, click the asp.net Web role, the > button, as shown in the following image. This step generates a new Webrole item in the right window. Click OK.


Step two: Observe the generated project


The project structure is shown in the following illustration:


Edit the Default.aspx page and add some test information, such as:

<%@ Page language= "C #" autoeventwireup= "true" codebehind= "Default.aspx.cs" inherits= "Webrole1._default"%>

<! DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd ">

<html xmlns= "http://www.w3.org/1999/xhtml" >

<head runat= "Server" >

<title></title>

</head>

<body>

<form id= "Form1" runat= "Server" >

<div>

Hello world!

</div>

</form>

</body>

</html>

Step three: Run the program

Press the F5 key to start the debugger. The following pages will be met:


So far we have created the first Webrole program. If you pay attention, you will find a more than one program icon in the taskbar, see the following figure:


This is the dev fabric and dev Storage Manager. In short, he's a cloud simulator, and let's test our own programs locally to be able to run on Windows Azure platform. Typically, you can run on Windows Azure platform if you pass a local test, but there are some exceptions. For these issues, we will explain in detail in future articles.

In the second article of this teaching series, we will publish this program to Windows Azure platform so that this page can be accessed by any user on the Internet.

This article from Csdn Blog, reproduced please indicate the source: http://blog.csdn.net/azurechina/archive/2010/05/14/5591059.aspx

Related Article

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.