Introducing DotNetFunda.com on mobile http://m.dotnetfunda.com ! Be with DotNetFunda.com on the go !
Go to DotNetFunda.com
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 2996 |  Welcome, Guest!   Register  Login
Home > Articles > Azure > Simple 5 steps to run your first Azure program

Simple 5 steps to run your first Azure program

Article posted by Questpond on 12/31/2009 | Views: 3526 | Category: Azure | Level: Beginner red flag


In this article we will look in to 5 basic steps which will help us to run our first azure program. In this article we will understand how to create a simple web role application and while doing the same we will understand some development concepts of Azure.

Simple 5 steps to run your first Azure program

 

Introduction

Step 1:- Ensure that you have the proper OS and VS edition.

Step 2:- Download the Windows Azure SDK

Step 3:- Download Windows Azure tools

Step 4:- Create the project

Step 5:- Run your application




Introduction


In this article we will look in to 5 basic steps which will help us to run our first azure program. In this article we will understand how to create a simple web role application and while doing the same we will understand some development concepts of Azure.


In case you are new to azure do have a look at my azure FAQ for beginners @ http://www.dotnetfunda.com/articles/article482-windows-azure-faq-part-1-.aspx   .


If you are really lazy like me you can download my two azure basic videos which explain what azure is all about Video1 , Video2.


Please feel free to download my free 500 question and answer eBook which covers .NET , ASP.NET , SQL Server , WCF , WPF , WWF@ http://www.questpond.com  .

So let’s start with the 5 basic steps. By the way when I wrote this article it was 31st December, 10:30 evening, so Happy New Year and blast yourself. Do not drink and drive , just drink , drink and sleep.
 

Step 1:- Ensure that you have the proper OS and VS edition.
 

Windows azure works only on Windows 7, Windows Server 2008 and Windows Vista. It does not work on XP currently. So ensure you have one of the above mentioned operating system. Developers who are on XP do not attempt it, I have tried heavily but there is no way currently to execute Azure on XP. There are lot of hack which are given online, believe me none of them work.

From visual studio aspect ensure you have VS 2008 or VS 2010.
 

Step 2:- Download the Windows Azure SDK
 

Windows Azure SDK simulates Azure hosting environment in your PC, so that you can develop your applications locally and then upload the online. So the first step is to download the SDK.

http://www.microsoft.com/downloads/details.aspx?FamilyID=772990da-8926-4db0-958f-95c1da572c84&displaylang=en 

Once you install Windows Azure you should see two menus one of the development fabric and the other of the development storage.
 

You can also see the fabric and storage running on your task bar.

If you click on the same you should be able to see the fabric and storage as seen in the below figure.

Step 3:- Download Windows Azure tools
 

We will need the cloud service visual studio template to speed up development in visual. So click on the below link to download windows azure tools which will install the template in visual studio.

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

If windows azure tool is successfully installed you should get the cloud service template as shown in the below figure.
 

Step 4:- Create the project
 

Once you have the cloud service template in your visual studio environment, click on it and select the ‘Web role’ as shown in the below figure. There are two kinds of basic applications you can create on azure ‘Web role’ and ‘Worker role’. Web role are nothing but web application while worker roles are back ground processing applications like windows processes.

To keep it simple we have currently selected ‘WebRole’.
 

Once you are done you should get two projects as shown below. Once project is the cloud service project and the other is your web application. Cloud service project has associations to web and worker role projects.

The cloud service has two files ‘ServiceConfiguration.cscfg’ and ‘ServiceDefinition.csdef’.

The ‘ServiceDefinition.csdef’ file contains the metadata needed by the Windows Azure fabric as per your application needs. It will also contain configuration settings that apply to all instances. .

The ‘ServiceConfiguration.cscfg’ file lets you set the values for the configuration settings and the number of instances to run for each role. So you can define some parameter called as ‘ConnectionString’ in your definition file and set the value in the configuration file.
 

Step 5:- Run your application
 

In order to keep this simple just run the project as it is. Your application will run as shown in the below browser and at the back ground fabric will create virtual instance in which your application runs. The below figure shows the virtual instance created by fabric to run your application.
 

In order to understand the power of azure configuration, go to the service configuration file and change the instance to 2, you should see two instances of your web role running as shown below.

If you like this article, subscribe to our RSS Feed. You can also subscribe via email to our Interview Questions, Codes and Forums section.

Page copy protected against web site content infringement by Copyscape
Found interesting? Add this to:



Please Sign In to vote for this post.

Experience:0 year(s)
Home page:http://www.questpond.com
Member since:Wednesday, September 03, 2008
Level:Starter
Status: [PanelMember] [Member] [Microsoft_MVP] [MVP] [Administrator]
Biography:

I am a Microsoft MVP for ASP/ASP.NET and currently a CEO of a small
E-learning company in India. We are very much active in making training videos ,
writing books and corporate trainings. Do visit my site for 
.NET, C# , design pattern , WCF , Silverlight
, LINQ , ASP.NET , ADO.NET , Sharepoint , UML , SQL Server  training 
and Interview questions and answers

>> Write Response - Respond to this post and get points
Related Posts

we have seen 5 simple steps to create web role application. Web role projects in Azure are like web applications. Azure has one more type of project i.e. worker role. Worker role applications are back ground processing application like windows process which runs on the back ground. In this article we will try to understand 6 basic steps to create worker role project and as we run through the article we will try to understand the various fundamental methods which are executed in worker role projects.

Access Control provides an easy way to provide identity and access control to web applications and services, while integrating with standards-based identity providers, including enterprise directories such as Active Directory, and web identities such as Windows Live ID, Google, Yahoo! and Facebook.

There is a buzz around cloud adoption which promises capacity-on-demand and elasticity. Windows Azure is the answer to cloud from Microsoft. Let us discuss about Azure in a series of articles.

Azure has provided 4 kinds of data storages blobs, tables, queues and SQL azure. In this section we will see how to insert a simple customer record with code and name property in Azure tables.

Different people have different obsessions and I have this stupid obsession of writing articles in FAQ formats :-) . The more I try to write articles in normal format I end up with a FAQ. My only thought process of writing articles in FAQ format is that we end up talking to the point rather than talking about trees and rivers , many may disagree.

More ...
About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you found plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/21/2012 7:35:40 AM