How To Deploy Web Apps On Azure, Using Visual Studio 2015

Prerequisites 
  • Visual Studio 2015 update 2
  • Active Microsoft Azure Account
Introduction 
 
Microsoft Azure is one of the most popular cloud services. It is very easy to deploy the web apps, mobile services, and virtual machines in Microsoft Azure. It is also very easy to create and setup the app. You can deploy the services on Azure cloud so that they can be accessed from anywhere, anytime.

ASP.NET is an open source web framework for building modern web applications and services. It is based on the HTML and CSS designing concept. ASP.NET is used as the server side scripting language, in which, the development of web applications is easy because Visual Studio uses some of the collections of .NET framework, itself. The deployment of web applications is also easier in ASP.NET as compared to the other FTP servers.
 
Follow these steps to create and deploy the ASP.NET Web app in Azure, with the help of Visual Studio 2015.
 
Step 1: Go to Visual Studio 2015 update 2. Select New--> Installed --> Visual C# --> Web--> ASP.NET Web Application (as shown in the image below) and give a name to your project. Select the appropriate location to save your project. Give the  solution and project the same name. It helps in executing the project with ease. 

Asp.net Web application 
 
Step 2: Next, select the Empty web form and click OK to continue. It takes some time for adding the libraries.

Empty

Step 3: Next, add web form.
 
Go to the Solution Explorer and go to Add >> New item. It will select the new web form, Master page, CSS, JavaScript, and jQuery.

New item.

Step 4: 
Next, select the Web form, give it a name, and click Add. In this area, many type of forms are available. In this web form, we write CSS and HTML code and run the program.

Web form

Step 5: 
Next step is the programming part.
Write HTML code or design it using GUI method (hello world). Here, Visual Studio has three parts - design (For designing the application without going in HTML),split (Offers both the options, HTML and GUI), and code (For designing the application through HTML hard code). You can choose any option to design the application interface. 
 
Noe, click on run (any browser), at the top ribbon.

run

Output: This will show your content on the browser.

Output

Step 6: 
 
Go to portal.azure.com(sign in). You must have an active Azure account, either paid or free, in order to submit the application on cloud.

account

Step 7: In the Azure portal, go to your dashboard. Now, go to New-->Web+Mobile-->Web App.
 
Web app

Step 8: 
Now, comes the creation part.
  1. Give your web app a unique domain name (Ex:sample).azurewebsites.
  2. Next, assign the group name.(Ex:web).
  3. Now, check or un-check the option of "Pin to dashboard" as per your preference and click Create.

    create 
Step 9: Now, examine the notification. If the deployment is successful, go to the next step otherwise create the new web app again.

Next, click the domain name of your application (http://sample.azurewebsites.com).

domain

Output: It will show that your app is now accessible from anywhere, anytime.

OutPut

Step 10
  1. Next, go to More... option in your web app and select Get publish profile. This is the package to load or publish your web app n the Azure cloud.

    More 
Step 11:
  1. Go to Visual Studio 2015.
  2. Open the Solution Explorer and select your project name (Ex:select).
  3. Right click to select the publish.

    publish  
Step 12: It will open the publish profile.
  1. Next, select the publish target here. You can select the Import your publish profile.
  2. Click Next.

    publish  
Step 13: In this step, browse your file (publish profile) and click OK.

publish  
 

publish

Step 15: 
It will show the profile of your web app. 

Next, you need to check the validation of your web app that you want to deploy. If an error occurs, download the profile again.
 
Finally, select Publish and you can see your project on the web browser with its URL ( Ex: www.sample.azurewebsites.com).

publish
 
Output 

Output

Up Next
    Ebook Download
    View all
    Learn
    View all