Microsoft Azure Websites

«« Previous
Next »»

There is a detailed description of how to create websites in Azure in the chapter, ‘Compute Module’. Azure websites service is named ‘Web Apps’ everywhere in the management portal so don’t get confused. This chapter will discuss few more terms associated with Azure websites. In normal hosting environment, developers usually encounter problem when they deploy their websites in production. Azure websites service ensures that developers encounter least problems while deploying their websites. Also, Azure website service comes under PaaS (Platform as a Service). This means that websites can be deployed without actually having a full-fledged infrastructure.

Create a Website in Azure Management Portal


Just to reconnect with the website creation, let’s take a look at these steps of how to create a website in Azure Management portal.

Step 1 − Login to your management portal.

Step 2 − Click ‘New’ at the left bottom corner of the screen → Compute → Web Apps → Quick Create.

Microsoft Azure Websites, Microsoft Azure Certifications, Microsoft Azure Guides

Step 3 − Enter the details as shown in the picture above and click ‘Create Web App’.

Step 4 − Go back to websites in your management portal and you will see it listed. Click the URL.

Microsoft Azure Websites, Microsoft Azure Certifications, Microsoft Azure Guides

You will be taken to the website that you just created.

Microsoft Azure Websites, Microsoft Azure Certifications, Microsoft Azure Guides

Deploying Azure Website from Visual Studio


Let’s publish our website from Visual Studio in the domain name we just created. After a website or web application is created in Visual Studio.

Step 1 − Go to Solution Explorer and right click on the website/webapp name.

Step 2 − Choose ‘publish’.

Microsoft Azure Websites, Microsoft Azure Certifications, Microsoft Azure Guides

Step 3 − In this step, you need to connect to Azure subscription account in order. Click ‘Import’.

Microsoft Azure Websites, Microsoft Azure Certifications, Microsoft Azure Guides

Step 4 − Click ‘Add Azure Subscription’.

Microsoft Azure Websites, Microsoft Azure Certifications, Microsoft Azure Guides

Step 5 − For the first time, you will have to ‘Download Subscription file’.

Microsoft Azure Websites, Microsoft Azure Certifications, Microsoft Azure Guides

Step 6 − The above step will download a file with extension .publishsetting on your computer (if you are not logged in, it will ask you to login before downloading).

Step 7 − Come back to the same pop-up and now browse for the file that was just downloaded.

Microsoft Azure Websites, Microsoft Azure Certifications, Microsoft Azure Guides

Step 8 − Now expand the dropdown and you will see the websites available in your subscription. As in the picture below you can see two websites. Let’s select ‘tutorialsPoint’.

Microsoft Azure Websites, Microsoft Azure Certifications, Microsoft Azure Guides

Step 9 − On the following screen, leave the defaults on. There are many options for public methods. We need ‘Web Deploy’ method here. Click ‘Validate Connection’.

Step 10 − On the next screen, again the leave the defaults on.

Step 11 − Finally on the last screen, click publish.

Microsoft Azure Websites, Microsoft Azure Certifications, Microsoft Azure Guides

Step 12 − Go to the URL of website and you will see your content.

Microsoft Azure Websites, Microsoft Azure Certifications, Microsoft Azure Guides

You can see how easy it is to deploy a website in Azure using Visual Studio. You can make changes in Visual Studio and publish it from there itself. This makes testing of applications very easy.

Monitoring the Website


In the management portal, if you go to the website’s dashboard you can see the figures related to the website. You can control lots of things related to your website from this section of your management portal. You can see the website metrics, create backup, configure setting, and scale the website.

Step 1 − To see the website metric, select monitor from top menu and you will see the following screen.

Microsoft Azure Websites, Microsoft Azure Certifications, Microsoft Azure Guides

Step 2 − Go to the website and select ‘Dashboard’ from the top menu.

Step 3 − Scroll down and you will see the following information.

Microsoft Azure Websites, Microsoft Azure Certifications, Microsoft Azure Guides

Staged Publishing


Windows Azure enables the deployment of a website in stages. You can create the deployment slots.

Microsoft Azure Websites, Microsoft Azure Certifications, Microsoft Azure Guides

Add a Deployment Slot for Testing Before Production

Basically, this feature allows you to deploy your website in a separate slot for testing purpose and then switch the slot. If anything goes wrong, you can simply go back to the previous version by changing the slot. Sometimes, applications don’t behave well as they are expected to at a large scale, this feature comes handy in such situations. This makes deployment tasks very easy for developers and organizations.

«« Previous
Next »»

0 comments:

Post a Comment