This is the second article in series of Windows Azure Web Sites, In this article I am going to discuss about creating a Hello World ASP.NET MVC Web Site & publishing it on Windows Azure Web Site.
To start with Windows Azure Web Sites login to https://manage.windowsazure.com, then go to bottom left corner of portal, we will find a NEW button, click on it.
It will display the following pop up, in the pop up click on COMPUTE then WEB SITE then QUICK CREATE:
Once you click on QUICK CREATE, It will show a textbox for entering the URL (all the website URLS’s on azure ends with “.azurewebsites.net”) of the web site & dropdown for choosing REGION for creating web site. Once you enter the details click on CREATE WEB SITE. With in few seconds a web site will be created & running on Azure.
Now our web site is now ready on Azure.
Let’s go to visual studio & create sample application using ASP.NET MVC 4 Internet Template.
-
Open Visual Studio 2012, Then go to FILE menu
-
FILE => New => Project => Visual C# => Web => Select “ASP.NET MVC 4 Web Application”
-
Let’s run this application (Hit F5).
-
Output is standard ASP.NET MVC 4 Internet ready website, which is running on localhost. Now publish this website to Azure Website we created in earlier steps.
-
Go back to Windows Azure portal => WEBSITES => Click on “hyd-demosite1” => go to “DASHBOARD” => under quick glance => click on “Download the publish profile”.
-
A “.PublishSettings” file will download into local machine. This is a xml file contains all the required information(site location, credentials, ftp details etc.) for publishing the web site to Azure.
-
Now go to Visual Studio => Open Solution Explorer => Right click on Project => select “Publish” in context menu.
-
It will open a “publish web” window. In “Publish Web” window using import button to choose the “.PublishSettings” file downloaded in earlier step. Then simply we need to follow the wizard &then finally hit the publish button.
-
We can see the publishing progress in Output window. Once publishing is done, Website published on azure will be opened in a new browser window.
-
Let’s make some changes & publish the site again to azure
-
To publish the site again, repeat above publishing steps.
This is the quick overview of Hello World Demo on Windows Azure Web Sites, here are the links for remaining article in the series.
4 Comments