Architecture & DesignSetting Up Azure and Deploying Your First Application

Setting Up Azure and Deploying Your First Application content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.


Windows Azure is Microsoft’s entry into cloud computing. If you are unfamiliar with cloud computing, it was explained pretty well at a Microsoft road show event with the following analogy. Everyone is familiar with electricity. You flip a switch; your lights go on or off. You pay based on that switch and if electricity is being used or not. Electricity is something expected to just be there. You probably do not wonder about the power plant, their operations, transmission lines, sub stations, etc.

Microsoft explains Azure by saying “The Windows Azure Platform (Azure) is an Internet-scale cloud services platform hosted in Microsoft data centers, which provides an operating system and a set of developer services that can be used individually or together.”

At a basic level, Azure can save costs as users pay a provider for only what they use. You need it, it exists and you pay for it. If you don’t need it, turn it off and you don’t pay for it. Cloud computing can really offer the most value to a company by taking ‘commodity’ applications out of the IT burden, letting your resources (infrastructure and personnel) focus on the company’s critical line of business applications. The “electric” analogy works at a very high level but is not intended to give a complete picture. It is important to know what cloud computing is not. This analogy might imply that cloud computing is a magical solution where companies can place all their IT infrastructure, applications and trust. Companies will always maintain the need to have applications and infrastructure in house. Cloud computing will not always contain IT elements like company policy, privacy concerns, industry regulations, etc. Some people have already confused the cloud computing concept with other concepts, including grid computing (system cluster combined for large functions), utility computing (a resource package similar to a metered electricity service) and autonomic computing (self managing systems).

The following is a walkthrough of getting your Azure CTP account set up, so you can get a preview experience in this next evolution in architecture:

Getting Started with Azure

First, you should access the website (http:// and register for Azure services. While you are there you will find links for the following:

  • Download the SDKs and add-ins for Visual Studio

    • Note: The current version is the Microsoft VS July 2009 CTP. It requires Windows Vista SP1 or later operating system with IIS7 to install.

  • Training and tutorials

Registering requires you have a Microsoft Live ID. When you click on the Register for Azure Services link, you are brought to to complete your registration. After completing a series of questions and agreeing to user agreements, you are brought to the Windows Azure Platform page that covers the basics about invitation codes. This is important because during the CTP, you need to get invitation tokens to use the Azure services.

From the Windows Azure Platform page, you have the option to request/get a Windows Azure invitation token. As a tip, get this token first before requesting the .NET Services Portal and Live Services Portal tokens. To get those tokens, you are navigated away from the Microsoft Connect page and there is no real logical way to get back. When the Windows Azure invitation token is created, copy to Notepad or somewhere you can get it later. This is all you’ll need from the Microsoft Connect site.

Please note, at the time of writing this, the Windows Azure service, .NET Services and Live Services are all available instantaneously after signing up. The SQL Azure service still requires you to wait until it is available. For more information on the Azure services visit:
https:/ /

Once you have your Windows Azure token you can sign in to the Azure site ( and claim your token. Claiming your token is done by clicking on the “Account menu” option and then the :Manage My Tokens” link. Copy and paste your token into the provided box and click “Claim Token”. Once activated, you will be taken to the My Projects page under the Summary menu tab where you can create your first project.

Creating Azure Services

Consider projects as the overall solution container for your Azure applications. You can organize your applications and manage services within a project. Your first project will be empty when you click on it in the project’s grid of the My Projects page.

The first step will be to add a new service. Click the “New Service” link in the top right corner of the page.

You will be taken to a page that allows you to create a Storage Account or add Hosted Services. For any application, you will typically need some form of persistence or storage. Windows Azure offers storage of large volumes (up to 100TB per account if you were wondering) of structured and unstructured data as part of the Storage Account service. If you plan on storing data in the cloud, you will need two key pieces of information from the Storage Account service for your application to access the storage.

Click on the Storage Account and give it a name and description. On the next page, you will be asked to provide what is going to become your storage account’s URL, or the end point where you access your data in Azure.

Click the Create button to generate the Storage Account. The Storage Account summary page that is generated has two key pieces of information on it that your application will need to know in order to access the data. Your application will need to know the end point URL and the Access Key. To help you get started, check the page links to download the SDK, tools for VS and learning material.

Now that you have a storage account set up, create the Hosted Service, which can be thought of as the front end to a web application or web service. Back on the new service page, pick Hosted Services and you will be asked to enter the services name and a description. On the next screen, you will be able to set up the application’s URL and affinity.

Currently your cloud service’s URL is limited to being a sub domain of (e.g. This condition might leave you wondering if and how you can use your own domain name, like The quick answer is that DNS hosting is not part of the Azure service. Instead, use your existing DNS hosting service and add a CNAME record for your domain to point to your domain.

Selecting the region/affinity is fairly limited in the CTP with only two main regions, but as the rest of the MS data centers come online, the options should increase. As you saw in the set up of the Storage Account, both that account and the Hosted Service can be assigned independently to the same or different regions. Keep them in the same region for performance reasons. For assistance, create an Affinity Group which helps you keep storage and hosting services in the same region.

Deploying an Application to Azure

Once your URL and region/affinity is set up, clicking the “Create button” finalizes the creation process of the hosted service and takes you to the service’s summary page. Deployments and migrations from staging to production are initiated from the service’s summary page.

Below staging, click on the Deploy button to select the application package and configuration settings for your application.

The package extension for the application will be ‘.cspkg’ and the configuration settings ‘.cscfg’. Don’t worry too much if you are unfamiliar with these extensions since the Visual Studio add-in for Azure does almost all the lifting. This walkthrough uses an application package and configuration settings already built using VS 2008.

The last thing to note on the deployment page is to “Provide a label for the deployment,” which is an easy way for you to keep track of the deployment version. Enter “1.0” and click Deploy to deploy your first application up to the cloud. The initial deployment should only take one to two minutes. During deployment, the uploaded configuration file is used by Azure to copy the application to the correct number of instances (machines).

Immediately following a successful deployment, you will notice that your staging environment is ‘lit’ now that it contains an application. Under the staging environment, you will see detail about how many instances are set up with your application and the private test URL, using a private deployment ID (GUID), which you can use to test your application before moving it to production.

The Configure button allows you to update your configuration settings after uploading your application. From the configuration editor, you are able to change the number of instances the application will use, update the storage account end point URL and access key, and many more things. In the future, Microsoft has plans to extend the uses and options in the configuration file.

Once the application is deployed and configured, click the “Run” button to have Azure start up the configured number of instances (machines). While you wait on Azure to start the servers, it is nice to appreciate at this point that with a few clicks of a mouse button you (really Azure, but you can take credit) have set up a staging environment, deployed your application, provisioned load balancers and networking devices, handled patching of the OS, ensured redundancy against hardware and made sure that plenty of storage was allocated for your needs.

After the application is running and tested, you have the ability to move it into your production environment from staging. Since these environments are actually virtual, Microsoft plans in the future to let you have multiple environments like “Dev”, “Test”, “QA”, etc. Clicking the ‘sync’ button in the middle, between the two environments, moves the application from staging to production.

Wait a few minutes for the DNS to propagate before navigating to the web site URL. If you get a 404 page error, wait a few minutes and try again. The time it takes to propagate for the first time varies.


As you can see from the above walkthrough, Azure makes it extremely easy to set up scalable environments, deploy your application to those environments and configure it on the fly. Microsoft Azure creates a unique, comprehensive system ideal for simplified managements and resource organization, which can greatly decrease unnecessary costs. The “pick and choose” service can save time, money and resources while simplifying complex systems into a manageable application.

About the Author

Matt Goebel is a consultant with AP Innovation, Inc. in Indianapolis, Indiana. He can be reached at 859-802-7591 or matt

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Latest Posts

Related Stories