I am going to start a new article for users who want to learn Microsoft Windows Azure from the scratch. Let's start with a step by step approach.
Firstly, go to http://azure.microsoft.com/ and create a free Microsoft Windows Azure Account.
When you log in Windows Azure with any Microsoft Account like Outlook, Live or other, you will get an Account. After that go to https://manage.windowsazure.com/ and login, then click on portal link.
You can see the image in the following portal.
Now you can manage your Azure portal from web account or directly from your Visual Studio using Azure SDK. If you are using VS2012, download Azure SDK first.
And after installing Azure SDK, your Visual Studio Server Explorer will be visible.
Right Click on SDK and click “Connect to Microsoft Azure Subscription...”.
It will open a window to log in Windows Azure Account.
Enter your Microsoft Account Id on which you have Azure Subscription, then password details and press enter to login.
Now go to Azure SDK in Visual Studio Server Explorer and open Web Sites. Now you can see all the web sites created in your Azure Account.
If you need to add or create a new website in your Azure Account, we have the following two ways:
- By Windows Azure SDK in Visual Studio.
- By Windows Azure Web Portal.
So let’s see both one by one and step by step.
By Windows Azure SDK in Visual Studio
Step 1. Go to Azure SDK in Server Explorer and right click on Web Sites and find the link “Create New Site”.
Now you’ll see a window where you have to enter the following details:
- Site Name.
- Select Region.
- Database Server (if you have).
Let say I have entered my new site name “meandmy”, if the name is available it will allow me to create web site. Select a region like I selected East Asia. At last select database if you have any database on Azure for your web site.
When you click on create button, you can see your web site to SDK or Azure web portal.
Now go to your Azure portal and refresh. After refreshing it, you can see the same site in your web portal created by SDK.
By Windows Azure Web Portal
Now I am going to create web site from Web Portal, so let’s go to web portal and see the NEW button on the left side bottom and click on it.
Now click COMPUTE, then WEB APP and QUICK CREATE:
Now enter a URL for Website on which you need to host you web site and select APP SERVICE PLAN and lastly click CREATE WEB APP:
After that enter all the details.
Now web site is ready to use.
If you want to use this in SDK, open SDK and right click on Refresh.
Now you can see the websites on SDK.
Create Web Project in Visual Studio to host on Web site that is already created on Azure Account. Open Visual Studio,
File, then
New Project and select
Web. After that click ASP.NET Empty Web Application and press
OK.
Open Solution Explorer now and right click on Project, then add any Default page to View the Test Output.
Write any name for view page.
I just wrote a welcome message on page for testing.
If I run this web application on local system, the output will be the following:
Now I will upload this to web site in Azure.
Firstly, right click on the project and find the link
Publish...
Select the publish targetselect type and if you want to publish on windows azure, select the first link in the following window and click
Publish button.
Now select your website name from the dropdown where you need to upload.
After selecting the website, it will download all the publish profiles from Azure and will fill all the details.
Click on
Validate Connection button to check all the settings are valid or not. If all are valid, click
Publish Button.
Now see the upload progress in output window.
After
Publish succeeds it will directly open the URL in the Web Browser. Now you can check this link anywhere or any device like mobile.
Thanks for reading the article.