/Azure_WebApp_Deploy_WebAPIdotNET8

How to deploy a .NET 8 WebAPI in Azure WebApp service

How to deploy a .NET 8 WebAPI in Azure WebApp service

1. Create .NET 8 Web API with VSCode

Create a new folder where to place the application

Open VSCode with the command:

code .

Create a new .NET 8 WebAPI with this command:

dotnet new webapi --framework net8.0

image

Run the application to verify

dotnet run

image

image

2. Deploy the application to Azure Web App service

In the left menu select Azure extension

image

image

Set the .NET 8 Web API name

image

image

image

Select the .NET 8 framework

image

Select the operating system linux

image

Select the location East US

image

Create a new Service Plan

image

Enter the new Service Plan name

image

Select the App Service plan Basic (B1)

image

Skip creating a new Application Insights resource

image

Create a new deployment

image

Place the Web API in a folder

image

image