Deploying Your First Web Site on Windows Azure

I have a couple of web sites, some of which are hosted on a VPS that are totally managed by me, some hosted on AWS. But, do you know what? There is a new player in town, Windows Azure!

Azure has a beautiful, dynamic interface for managing everything (except the tasks done through Management Portal for SQL Database), that is called Windows Azure Management Portal or just Portal.

You can create web sites, virtual machines, mobile services, cloud services, SQL databases, media services, virtual networks etc. with just a few clicks.

In this post I will briefly explain how to deploy a simple website on Windows Azure.

First of all you need to create an account on windows azure. For this, go to http://windowsazure.com, click FREE TRIAL on the upper right corner and follow the steps.
Note: You will need valid credit card info to be able to use trial version.

Let's go on assuming you have completed your trial registration and logged in. The first screen that opens is the famous “Portal”.

Click “+NEW” on the lower left corner, then on the window that opens click “WEB SITE” under “COMPUTE” then click “QUICK CREATE”.

Write a URL and select a region. Windows Azure automatically selects the most suitable region for you.
Click “CREATE WEB SITE” on the lower right corner. You will see a progress while your web site is being created, and it will be ready in seconds!

Now go to http://<you_web_site_name>.azurewebsites.net to see your default page.
(For example in my case i go to http://mynewazuresite.azurewebsites.net)

Your first web site is working now. Now let's deploy your own code to Azure using Visual Studio. Before that you need to get your “publish profile” for your azure web site.

Click on the name of your web site on “web sites” screen, click “Download the publish profile” on the screen that opens. You will use this file later. Keep reading.

Open Visual Studio 2012,
Create a new ASP.NET MVC 4 Web Application (let's create an Internet Application),
Make some changes to the default site code. Just change some text if you like,
Right-click your MVC Application in the solution explorer,
Click “Publish”,
On the window that opens, import the publish profile that you downloaded a couple of steps ago,
This profile file will fill out all the information required by the web deploy publishing method,
Click “Publish”.

Now your first web site runs on Windows Azure.

Hope this helps someone.

Good luck,
Serdar.

Leave a Reply

Your email address will not be published. Required fields are marked *