Azure  

Introduction to Azure App Service and Deploying with Visual Studio

In this article, we will explore Azure App Service and understand how to configure it using the Azure Portal. We will also deploy a sample ASP.NET Core application to Azure App Service using Visual Studio.

Agenda

  • What is Azure App Service?

  • Difference between Azure App Service and Azure Virtual Machine

  • How to configure Azure App Service in the Azure Portal

  • Deploying an ASP.NET Core application using Visual Studio

What is Azure App Service?

Azure App Service is fully managed. platform as a service (PaaS) offering provided by Microsoft. It allows developers to build, deploy, and scale web applications, REST APIs, and backend services without managing the infrastructure.

With Azure App Service, you do not need to worry about:

  • Server management

  • Operating system updates

  • Infrastructure maintenance

  • Load balancing configuration

Microsoft manages all of these at the platform level.

Key Features of Azure App Service

  • Multiple Language Support
    Supports .NET, .NET Core, Java, Node.js, Python, and PHP.

  • Built-in CI/CD Integration
    Can integrate directly with GitHub, Azure DevOps, or publish via Visual Studio.

  • Auto Scaling
    Automatically scales up or out based on traffic.

  • High Availability
    Built-in load balancing and fault tolerance.

  • Security & Compliance
    Supports HTTPS, authentication/authorization, managed identities, and private endpoints.

Difference between Azure App Service and Azure Virtual Machine

FeatureAzure App ServiceAzure Virtual Machine
Service ModelPaaS (Platform as a Service)IaaS (Infrastructure as a Service)
Server ManagementManaged by MicrosoftManaged by User
OS AccessNo direct accessFull access
ScalingAutomaticManual (or configured manually)
MaintenanceManaged by MicrosoftUser responsibility
Deployment SpeedFasterSlower
Cost ManagementOptimized for appsDepends on VM size & usage

Simple Explanation

  • Azure App Service → Focus only on your application. Microsoft handles the infrastructure.

  • Azure Virtual Machine → You control everything, including the operating system and server setup.

When to Choose What?

  • If you are deploying an ASP.NET Core Web API using Visual Studio, App Service is usually the best and easiest choice.

  • If you need complete control over the server environment, choose Virtual Machine

How to configure Azure App Service in the Azure Portal

Step 1: Login to Azure Portal

Go to https://portal.azure.com
Sign in with your Azure credentials.

Step 2: Create a Web App

  1. Click Create a resource

  2. Select Web App

  3. Click Create

This will create an instance of Azure App Service.

S1

Step 3: Configure Basic Settings

Fill in the required details:

  • Subscription → Select your active subscription

  • Resource Group → Create new (e.g., AppServiceDemoRG)

  • Name → Enter unique app name (e.g., myappdemo123)

  • Publish → Code

  • Runtime Stack → .NET (Choose version like .NET 8 or .NET 6)

  • Operating System → Windows

  • Region → Choose nearest region (e.g., Central India)

s2
  • Click Review + Create

  • Click Create

Deployment will take 1–2 minutes.

Step 4: After Deployment

  • Go to Resource

  • Click the Default domain URL

On the Overview page, look for:

Default domain:
https://myappdemo123.azurewebsites.net

Click it.

You should see the default Azure App Service page.

s4s5

Deploying ASP.NET Core Application to Azure App Service Using Visual Studio

Step 1: Open Your Project

  1. Open Visual Studio 2022

  2. Open your ASP.NET Core project

  3. Make sure the project builds successfully

Step 2: Right-Click → Publish

  1. In Solution Explorer

  2. Right-click on the project

  3. Click Publish

s7

Step 3: Choose Publish Target

In the Publish dialog:

  1. Select Azure

  2. Select Azure App Service (Windows)

  3. Click Next

Step 4: Select Existing App Service

  1. Choose Select Existing

  2. Click Next

  3. Sign in to Azure (if not already signed in)

  4. Select:

    • Subscription

    • Resource Group

    • Your App Service (e.g., myappdemo123)

  5. Click Finish

Visual Studio will create a publish profile automatically.

s10

Step 5: Click Publish

Click the Publish button.

Visual Studio will:

  • Build the project

  • Package the application

  • Deploy to Azure

  • Open the browser automatically

s11

Conclusion

In this article, we explored how to create and configure an Azure App Service using the Azure Portal and deploy an ASP.NET Core application using Visual Studio 2022.

We covered:

  • Understanding what Azure App Service is

  • Difference between Azure App Service and Virtual Machine

  • Deploying an ASP.NET Core application directly from Visual Studio

  • Verifying deployment using API endpoints

Azure App Service simplifies cloud hosting by eliminating the need to manage servers, operating systems, and infrastructure. It allows developers to focus entirely on writing and deploying application code.

Thank you so much for reading this article. Happy coding!!