Quickstart: Deploy a .NET Web App to Azure App Service
This guide will walk you through the steps to deploy a simple .NET web application to Azure App Service using Visual Studio and the Azure CLI.
Prerequisites
- An Azure account. If you don't have one, sign up for a free account.
- Visual Studio 2022 installed with the ".NET desktop development" or "ASP.NET and web development" workload.
- The Azure CLI installed. You can download it from here.
Step 1: Create a New ASP.NET Core Web App
Launch Visual Studio 2022.
Click on "Create a new project".
Search for "ASP.NET Core Web App" and select it. Click "Next".

Enter a project name (e.g., MyDotNetApp
), choose a location, and click "Next".
Select ".NET 7.0 (Long Term Support)" or a later version. Ensure "Use top-level statements" and "Do not use top-level statements" are checked as per your preference. Click "Create".
Step 2: Run the App Locally
Press F5
or click the "Run" button in Visual Studio to build and run your application locally. A browser window will open with your running app.
Step 3: Deploy to Azure App Service
In the Solution Explorer, right-click on your project (e.g., MyDotNetApp
).
Select "Publish...".
In the Publish dialog, select "Azure" and then "Azure App Service". Click "Next".
Choose "Create new".

Click "Create new..." next to the App Service field.
- Subscription: Select your Azure subscription.
- Resource Group: Click "New" and create a new resource group (e.g.,
rg-dotnet-app-qs
). - Name: Enter a globally unique name for your app (e.g.,
my-dotnet-app-unique-name
). - Operating System: Choose "Linux" or "Windows".
- Region: Select a region close to you.
- App Service Plan: Click "New" to create a new App Service plan. Choose a pricing tier (e.g., "F1 Free" for testing, or "B1 Basic" for more features).
Once the App Service and plan are created, click "Finish". Visual Studio will prepare the publish profile. Click the "Publish" button.
Step 4: Verify Deployment
After the publish process completes, Visual Studio will automatically open a browser window to your deployed Azure App Service URL (e.g., https://my-dotnet-app-unique-name.azurewebsites.net/
).
Next Steps
- Learn more about deployment options.
- Explore how to monitor your application.
- Understand how to scale your app.