Share via


Deploy an ASP.NET Core container to Azure App Service using Visual Studio

This tutorial walks you through using Visual Studio to publish your containerized ASP.NET Core web application to an Azure App Service. Azure App Service is an appropriate service for a single-container web app hosted in Azure.

You can also deploy to Azure Container Apps. For a tutorial, see Deploy to Azure Container Apps using Visual Studio.

If you don't have an Azure subscription, create a free account before you begin.

Prerequisites

To complete this tutorial:

Create an ASP.NET Core web app

The following steps guide you through creating a basic ASP.NET Core app that will be used in this tutorial.

Deploy the container to Azure

View container settings

In the Azure portal, you can open your deployed App Service.

You can view settings for your deployed App Service by opening the Container settings menu (when you are using Visual Studio 2019 version 16.4 or later).

Screenshot of Container Settings menu in the Azure portal.

From there, you can view the container information, view or download logs, or set up continuous deployment. See Azure App Service Continuous Deployment CI/CD.

Clean up resources

To remove all Azure resources associated with this tutorial, delete the resource group using the Azure portal. To find the resource group associated with a published web application, choose View > Other Windows > Web Publish Activity, and then choose the gear icon. The Publish tab opens, which contains the resource group.

In the Azure portal, choose Resource groups, select the resource group to open its details page. Verify that this is the correct resource group, then choose Remove resource group, type the name, and choose Delete.