Steve Spencer's Blog

Blogging on Azure Stuff

Migrating an Existing Web Application to Windows Azure

Moving to Windows Azure is not as difficult as you might think. Using a basic MVC 2.0 web application created in Visual Studio 2010, the Azure tools within Visual Studio enable you to migrate the web side really easily.

Load your MVC 2.0 application into Visual Studio and right click on the solution in Solution Explorer and add a new project to this solution.

image

Select Windows Azure Project and enter a new project name.

When the next dialog appears, do not select any role and press OK.

 

image

In the Windows Azure project rigt click on the roles folder and select Add->Web Role Project in solution

image

 

Select the MVC project and press OK

image

You MVC web application should now be ready for deployment to azure. Hit F5 and make sure that the solution builds and runs in development fabric.

For most people this is not the end. There are a number of issues that you may need to resolve for example file access, database access, security and on premise integration. There are solutions for each of these and it depends upon what you are trying to achieve.

With data access, if you are currently using a SQL database and providing the database is not too complicated then it should just port across my running the same SQL scripts on your SQL azure database. You will then just need to change your connection string to point to SQL Azure rather than whatever database you are currently using.  To see the issues the TFS team had converting to the cloud see the PDC video

Information about setting up security using the Access Control Service can be seen in my earlier blog

File access can be done using Azure Drives if there is a lot of file access, but it may be easier to store the file as a single blob or migrate the data you are storing to able storage. I depends upon what you are using the files for.

Connectivity to on premise applications could be done a number of ways by using the service bus or Azure connect. Again it depends on what you are trying to connect to and how “real time” the connection needs to be. I will be putting together a comparison of the methods as soon as I get some free time.

Comments (3) -

  • June Macleans

    6/15/2011 9:55:38 AM | Reply

    I m in mid of development of MVC 2.0 app and now my client wants to convert it to cloud app.


    I'll work out above steps to convert my app into azure.


    Just one question, currently i dont have azure account, is any free or trial account provided by azure for trial purpose.

  • Steve

    6/15/2011 12:34:23 PM | Reply

    There is a free tiral currently running through to September 30th 2011 at http://www.microsoft.com/windowsazure/free-trial/. You will need a credit card to sign up so that you can pay for anything that is outside of the offer. You get 750 hours per month of an exrta small instance which is enough for 1 instance running for a month.

  • yu gi oh canada

    8/16/2018 12:23:06 AM | Reply

    Great goods from you, man. I've understand your stuff previous to and you're just too great.

Loading