Professional Documents
Culture Documents
1) Key Technologies
This demo uses the following technologies:
.NET Framework 4.0
Visual Studio 2010
Windows Azure Tools for Microsoft Visual Studio (includes SDK)
1
2) Steps to be performed
2
3) Creating the Hello Windows Azure application
Action Screenshot
1. Start Visual Studio 2010
Install the Windows Azure SDK and the
Windows Azure Tools for Visual Studio
Launch Visual Studio 2010 and create a new
project
2. Select File -> New Project
There is a category of projects – Cloud
Services
3. Select the Cloud Service project type
4. Select the Windows Azure Cloud Service
template
We have a new template called “Windows
Azure Cloud Service”
5. Name the solution HelloAzure
Let’s name our new project HelloAzure and
rename the WebRole1 to
HelloAzure_WebRole
6. Click OK to launch a wizard
This template launches a wizard that allows us
to select the type and programming language
for a role within our project.
3
7. From the wizard, add the ASP.NET Web
Role in C#
4
10. Wait for the new solution to be created
Visual Studio will now create a new
solution
This solution will contain two projects
The first project named
HelloAzure_WebRole is a standard
ASP.NET project
The second project is a new Cloud Service
project
5
12. Expand the Toolbox
First, let’s build our HelloAzure web page.
13. Drag and drop an ASP.NET Label Control
Let’s open the default web page
Now we’ll add a standard ASP.NET label control to
our default page.
14. Change the Font->Size property for the new label
to XX-Large
6
18. Select Debug->Start Debugging
Now let’s start the application in debug mode or just
press the familiar F5 button.
19. NOTE: It will take 30-90 seconds until the
devfabric starts.
This will cause the ASP.NET project to be compiled
into a .NET assembly, just as normal. This will then
start the Windows Azure Development Fabric.
7
22. Switch over to Internet Explorer to show the
application
Here we can see our simple ASP.NET web
application and the text “Hello Windows Azure”
8
4) Deploying the application
Action Screenshot
9
created
It will also launch the default browser
and navigate to the Azure Services
developer portal
Let’s copy the path to this file
10
6. Click on the New Service link
Here you can see the developer portal
and the projects that I have already
configured.
Let’s create a new project.
11
10. Enter a sub-domain name and press
the Check Availability button.
On the next step we can specify a sub-
domain for the application.
With the current CTP, your application
will be hosted at CloudApp.net
11. Continue this process until you find an
available sub-domain.
Let’s enter a sub-domain name and
check the availability.
12. Press the Create button to create the
new project.
12
14. Browse to the directory where you published the solution. ,
13
19. Wait for the service package to be uploaded. Once it is
uploaded, you will be redirected to the project details page.
At this point, the service package will be uploaded to the
Azure Services Developer Portal
14
21. Click the Run button to start the HelloAzure application.
22. NOTE: This process will take anywhere from 3 – 10 minutes.
Once the package is deployed, we can then start the
HelloAzure application.
When we click the Run button, this is when the real magic
happens.
At this point Windows Azure will start up virtual machine
instances for each of the roles.
In the case of our HelloAzure application, as you can see we
have two instances allocated for the WebRole.
Once the instances are started, then our application – the
assemblies, ASPX pages, etc. that we uploaded earlier – will
be deployed into each of the instances.
This process will take a few mintues.
15
23. Click on the Web Site URL for the Staging environment.
Once the application is running in staging, we can now
access it using the temporary Website URL generated below.
24. View the HelloAzure web site in the new browser window
25. Close the browser window.
Here we can see our Hello Windows Azure application
running in Windows Azure – it’s publicly exposed on the web!
In fact, you could even access it now if you could enter this
long, temporary web site URL.
16
26. Click on the sync button between the Production and Staging
environments
Let’s see how we can move our application from staging to
production.
We’ll click on the sync button and confirm that we want to
move the switch the staging environment with production.
27. You will be prompted to confirm that you want to switch to the
production environment. Press the OK button when
prompted.
28. NOTE: This can take a few minutes to start the production
environment.
17
32. You should see the web page with the text Hello Windows
Azure dialog.
Finally, you can see that our simple, Hello Azure application
is running in the production environment.
Notice that the URL is the sub-domain on cloudapp.net that
we specified when creating the project in the Azure Services
Developer Portal.
If you have internet access you can browse to this site now.
18
Summary
In this lab you saw three key things:
1. How to build and debug web applications using the familiar ASP.NET programming model and the new Windows Azure SDK and
extensions to Visual Studio.
2. How to use the Azure Services Portal to create projects, deploy applications, and manage the staging and production environments.
3. How to deploy, start, and manage a Windows Azure application through the Azure services Developer portal. We created and ran a new
application in the cloud.
1. References:
i) https://www.microsoft.com/handsonlabs
ii) For additional demos of the Windows Azure platform, please visit http://www.azure.com.
19