Getting Started with Adobe After Effects - Part 6: Motion Blur


Upload Image Close it
Select File

Authors

Getting Started with Windows Azure

Getting Started with Windows Azure - Part 8: Deploy ASP.NET MVC application to the Windows Azure Cloud using Visual Studio 2012

May 16 2013 12:00AM by Karthikeyan Anbarasan   

Introduction:

In this article, we are going to see how to deploy as ASP.NET MVC application to the Windows Azure Cloud services from Visual Studio 2012 IDE. In our earlier article we have seen how to analyze and capture a Virtual Machine Image and store it to the Cloud VHD. ASP.NET MVC 3 gives a powerful, patterns and framework based way to build dynamic websites that enables a clean separation of data and the views and that gives you full control over markup for enjoyable, agile development. ASP.NET MVC includes many features that enable fast, Test driven Development friendly development for creating sophisticated applications that use the latest web standards. ASP.NET MVC on windows Azure provides a greatest support with the web roles that are available to make the development much easier and quicker. Let us see the step-by-step process on how to develop an application and deploy the application directly to the Windows Azure Cloud Services.

Steps:

Open Visual Studio 2012 IDE in administrator mode and create a new Windows Azure Cloud Project by Clicking on New Project and selecting Cloud template tab as shown in the screen below. Note to open the Visual Studio Integrated Development Environment (IDE) in administrator mode as Microsoft Windows Azure projects need to take some control over the emulators, which needs the administrator privileges.

new project

Clicking on OK and proceeding to the next step, we can see a window with the list of available roles that can be used across different programming languages. Since in our example we are going to see how to develop an ASP.NET MVC3 app that will be deployed to the Microsoft Azure website, select the ASP.NET MVC3 web role and move it to the Windows Azure Cloud Services Solution to proceed to the next step as shown in the screen below:

Windows Azure Cloud Services Solution

We can see a new windows which the list of options that are required to configure the application, here we can select the application is going to be an Empty app, Intranet App or an Internet App. Since we are going to make it available over the internet we will select the application as Internet application and click on OK as shown in the screen below. If we need to create a unit test we can select the option that is available as a checkbox in the same screen.

project template

We can see the application project is created and the list of files will be loaded to the solution explorer. Now we will make some small changes in the application to showcase the application that is designed for this sample. So make changes in the views and build the application to view it locally as shown in the screen below:

changes in view

Now our next step is to start packaging and upload the application to the Windows Azure cloud services, to start with first right click on the application project and select the option Package. First we will package the application and upload the package to the Windows Azure Cloud Services using the available tools. Normally on creating a package, we will get two files namely a configuration file and a package file as shown in the screen below:

package

Clicking on Package option will get a small popup asking for the package configuration options like selecting the mode of the build configuration and the type of the service configuration to select based on our requirement as shown in the screen below:

package configuration

After selecting the appropriate option click on Package will start preparing the package (Service and Configuration files), we can see the status of the package preparation at the output window of the Visual Studio 2012 IDE. After successful creation of the package we can see a folder will be opened with the 2 files created for the application. Basically the folder will be created in the bin folder of the application project under the build option mode; here we selected the Release version so the package files will be created in the Release folder as shown in the screen below:

Release folder

Now we can see the package is ready to use, our next step is to publish the package to the Microsoft Windows Azure Environment. To start with login to the portal using the link www.windowsazure.com. On successful login select the option New Windows Azure Cloud Services as shown in the screen below. In the Windows Azure Cloud Services provide the valid Service name and select the appropriate region name and subscription to start creating the environment.

valid service name

Now we can see the services are created and clicking on the service name, we can see the option to start uploading the package. Click on the upload production package will open windows where we need to enter the deployment package name and select the appropriate package (i.e. the package file and the service configuration file) as shown in the screen below:

upload a package

Once all the files are selected click on proceed to process further, we can see the upload starts and it will take some time to provision based on the size of the package we deploy. Once the package is uploaded successful, we can see the environment ready and accessible as shown in the screen below:

environment ready

To access the application navigate to the URL http://f5debugbrmvc.cloudapp.net/ and we can see our application online which is hosted on the Windows Azure Cloud environment. The URL can be fetched from the Dashboard of the application, which we uploaded as shown in the screen below:

URL

Conclusion:

Therefore, in this article we have seen how to upload an ASP.NET MVC application, which is designed and developed in Visual Studio 2012 IDE with the help of inbuilt packaging tools for Windows Azure.


Karthikeyan Anbarasan
52 · 4% · 1176
0
Liked



Submit

Your Comment


Sign Up or Login to post a comment.

    Copyright © Rivera Informatic Private Ltd Contact us      Privacy Policy      Terms of use      Report Abuse      Advertising      [ZULU1097]