How to migrate your ASP.NET site to the Azure cloud


Cloud computing is one of the hot topics of 2011 with those willing to make the jump to a cloud-based solution finding financial savings in this new approach as well as, in many cases, better fault tolerance and a more responsive service turnaround in many cases. However, what many developers may not realise is just how straightforward it can be to migrate a web site from a local or hosted server into the cloud.
To demonstrate, this article will show you how to upgrade and deploy an existing ASP.NET 3.5 or 4.0 web application to the Windows Azure cloud platform.
We will cover:
  • The SDKs and tools to be installed on your machine before you can continue
  • How to set up your Windows Azure instance in preparation for the application
  • How to alter the application so that it will function in the cloud
  • How to deploy the application to Windows Azure
I’m going to assume that you’re already familiar with the .NET framework, that you know what the Windows Azure platform is, and that you’re comfortable with Visual Studio 2010. If you’ve not looked into Windows Azure before, have a look as Neil Mackenzie’s article “An Introduction to Windows Azure – What You Should Know” before continuing.

Pre-requisites

Before we begin, let’s get our development environment in order:
  • Back-up all your existing application code and data before you take another step! You can never be too careful.
  • Download and install the Windows Azure SDK
  • Download and install the Windows Azure Tools for Visual Studio 2010.
  • If you intend to implement session state in your application, then I’d recommend evaluating the Azure AppFabric Caching provider and for this you’ll need the Windows Azure AppFabric SDK.
You’ll need to make sure you have a Windows Azure services account. If you haven’t set one up already, sign up for a free trial. Windows Azure is a pay-as-you-go service but the free trial should more than suffice for you to experiment and try out Azure before you’ll need to start paying. If you’re a Microsoft BizSpark programme member or have an MSDN subscription, log in to your respective programme portal for information on the free offers available to you.

Modifying Your Existing ASP.NET Web Application

For the most part, modifying your existing ASP.NET application to run on the Windows Azure platform is a three step process:
  1. Create a new Windows Azure project into which code from your existing web application will be migrated.
  2. Alter the code in the new project to work in the cloud rather than on a ‘local’ web server. In particular, we’ll look at a. Moving configuration settings from web.config to the Azure RoleEnvironment b. Setting the number of instances of the site to be running in the cloud c. Options for handling session state in the cloud. In this article, we’ll see how to use Azure AppFabric for this purpose.
  3. Deploy your newly cloud-enabled application to the cloud.
So let’s start. Launch your copy of Visual Studio 2010, or Visual Web Developer Express and proceed to step 1.

Create A New Windows Azure Project

To begin migrating your web application to the cloud, you’ll need to create a new Windows Azure project to house your code. With Visual Studio running and in focus, you’ll need to:
  1. Click File > New Project.
  2. In the New Project dialog, select Visual C# > Cloud > Windows Azure Project, as shown below. New Windows Azure Project
  3. Name your project, set its location, choose a solution name and click OK.
  4. In the New Windows Azure Project dialog box, as shown below, do not select any roles to add. Just click OK to have Visual Studio generate a blank Windows Azure project.


  1. More Details http://www.developerfusion.com/article/119960/upgrade-your-aspnet-site-to-the-cloud/

Comments

Popular posts from this blog

Import, restore, or back up contacts in google

Whatsapp Floating icon in HTML

How to Set FileZilla to Open and Edit Files with Notepad++