Migration of an Existing On-Premise ASP.NET 4.0 Web Application to Windows Azure Part – I
December 7, 2011 4 Comments
In this world of Cloud, it’s very necessary to run your enterprise business apps in Cloud & provide the solution of better scalability, elasticity , High Availability & 24*7 on features to your customers.
- Windows Azure is Platform as a Service (PAAS) model which helps to upgrade us in such a service. In this article , an existing on-premise enterprise healthcare application has been migrated into cloud & hosted in Microsoft Data – Centers.
- To start working with Microsoft Windows Azure in Visual Studio 2010, Download the Windows Azure SDK from Azure website. http://www.microsoft.com/windowsazure/sdk
- Now , First load your existing enterprise asp.net 4.0 application into visual studio & then in the solution explorer of the project right click on the solution & click Add-> New Project.
- Now Select a new Windows Azure Project & named it & save it in the same folder of your existing on-premise application.
- In the Roles folder of your Windows Azure Project , Right Click, select Add & choose Existing Web Role in Solution.
- Now, check your existing asp.net web application has been migrated as a WebRole in Windows Azure Project. Next , Set up your Windows Azure hosting environment. During compilation of your Windows Azure application in your development machine , you may encounter the following error:
- Resolution: To solve this error, Open Windows Azure SDK Command Prompt in elevated mode & run the following command.
- If you dont have .SQLEXPRESS as default instance of your SQL Server instance then you can modify the command as
- Now , You will get the following prompt for initialization of Azure Storage Emulator in development fabric.
- Next , Build your complete project solution & run the Windows Azure Project with existing ASP.NET 4.0 web application. During the debugging you will see the compute emulator & storage emulator in your local dev fabric .
- Check out your on-premise existing asp.net web application migrated to windows azure & running in azure compute emulator in local development fabric.
- To deploy the application , right click on Azure Project & Click Publish & create package (.cspkg ).
- Now, select the radio button of Create Service Package Only otherwise select the second option if you would like to configure your Windows Azure Hosted service details in Visual Studio.
- Build the Azure Service Package File (.cspkg) & Service Configuration (.cscfg) in Windows Explorer.
- Next , Log on Windows Azure Developer portal with Windows Live ID with valid Azure Subscription & continue deployment.