Azure Web App Deployment Using Visual Studio

In this article, we will learn how to Create and Deploy the ASP.NET Web App in MS Azure, with the help of Visual Studio.

Prerequisites

  • Visual Studio
  • Active Microsoft Azure Account

Process 1 (Start with Visual Studio)

Step 1 (New project creation)

New project >> Installed >> Visual C# >> Web

Select ASP.NET Web Application.

Click OK.

Azure

Now, it’ll open the template.

Select Empty and click OK.

It’ll take some time to add libraries.
 
Azure

Step 2 (Adding the form)

In the Solution Explorer, right click the Web Application for adding a new form.

Add >> New item...
 
Azure

Select Web Form.

If you need to, you can change the form name as below.

Click add.
 
Azure

Step 3 (Programming Part)

Write the HTML code or design it using the GUI method (Hello World).

Here, Visual Studio has three parts,

  • Design (for design in the application without using HTML)
  • Split (Offers both the options, HTML & GUI)
  • Source (for designing the application through HTML hardcode)
Click Run at the top ribbon (you can run it in any browser).
 
Azure
 
Now, your code will appear on your browser.
 
Azure

Process 2 (Web App Creation)

Step 1

Open the Azure portal

http://portal.azure.com/

App Services >> Add >> Select Web App >> Create

This will open the Creation Part.
 
Azure

Step 2

We want to give some specific unique details here.

If you need, you can create a new App Service Plan. Otherwise, it’ll be set in default. (This plan setting will determine the location, features, cost and compute resources associated with your app.)

After giving the details Click Create.
 
Azure
 
This is the notification for finishing the app successfully.

Azure
 
Step 3

Click the domain name of your application (URL).

It’ll show your app. 
 
Azure
 
This is your created App.

We can access it from anywhere, at anytime.

Azure
 
Process 3 (Publishing Steps)

Step 1

Click Get publish profile on the top ribbon in the Azure portal.

This step is for saving  our publish profile.

Click OK.
 
Azure

Step 2

Go to Visual Studio.

Right click on the WebApplication in the Solution Explorer.

Select Publish.

It’ll open the Publish Web and we’re going to import our file here.

Azure

Select Import and click Next.

Click Browse to import your saved profile.

Select the file and click Open.
 
Azure

Step 3

After importing your file,  click OK.

It’ll open the Connection.
 
Azure
 
Step 4

This shows your profile of your Web App.

Now, you need to check the Validation of your Web App that you want to deploy.

If any problem occurs, download the file again on Azure.
 
Azure

Step 5

Type your form name, continuation with received URL.

(http://webapp56415002.azurewebsites.net/WebForm1.aspx)

Azure
 
Now, you can see your project on your Browser.

We can access it anywhere.

Azure

Summary

I hope this will be useful to you.

Thank you.