In this post, we’ll walk through the step-by-step process to deploy an ASP.NET Core Web App to Azure App Service using Visual Studio and the Azure portal.
Deploying an ASP.NET Core Web App to Azure App Service
Getting Started
Microsoft Azure provides a powerful platform for hosting web applications, and Azure App Service is a top choice for deploying ASP.NET Core applications due to its scalability, integration with Visual Studio and GitHub, and managed infrastructure.
Prerequisites
Before you begin, make sure you have the following:- NET SDK (latest version recommended)
- Visual Studio 2022+ with the “ASP.NET and web development” workload installed
- An Azure account – Create a free account
- (Optional) Azure CLI installed for command-line deployment
Create a ASP.NET Core Web API Project
- Open Visual Studio
- Click Create a new project
- Select ASP.NET Core Web API
- Click Next
- Name your project (e.g.,
MyWebApi
) - Choose .NET 6 or later (recommend .NET 8 if available)
- Click Create
Create an App Service & Resource Group
In Azure Portal
- Go to Azure Portal → App Services → + Create
- Fill in:
- App name (must be unique)
- Publish: Code
- Runtime stack:
.NET Core 8 (or your version)
- Region: Closest to your users
- Resource group: Create new or use existing
- Click Review + Create, then Create
Using Azure CLI
az group create --name MyResourceGroup --location eastus
az appservice plan create --name MyAppServicePlan --resource-group MyResourceGroup --sku B1
az webapp create --name MyAspNetApp123 --resource-group MyResourceGroup --plan MyAppServicePlan --runtime "DOTNETCORE|8.0"
Deploy ASP.NET Core Web API
via Visual Studio
- Right-click your project in Solution Explorer → Publish
- Choose Azure → Azure App Service (Windows/Linux)
- Select your subscription and target App Service
- Click Finish, then Publish
Visual Studio will build and deploy your app automatically. After deployment, your browser will launch the live site.
via GitHub Actions
- Push your code to a GitHub repository
- In Azure Portal, go to your App Service → Deployment Center
- Select GitHub as source and follow the wizard
- Azure will create a GitHub Actions workflow for continuous deployment
Using FileZilla
Deploying an ASP.NET Core Web App to Azure App Service using FileZilla involves publishing your application locally, then uploading the files to the Azure App Service via FTPS.
- First publish your application locally.
- Get Azure App Service FTP Credentials.
- Connect to Azure FTP using FileZilla
- Open FileZilla.
- Go to File > Site Manager.
- Click New Site.
- Enter the following:
- Protocol: FTPS - FTP over explicit TLS
- Host: e.g., waws-prod-*.ftp.azurewebsites.windows.net
- Port: 21
- Encryption: Use explicit FTP over TLS
- Logon Type: Normal
- Username: e.g., yourwebappname\deployment_username
- Password: Use the password from the publish profile or portal
- Click Connect.
- Upload Your Published Files
- In FileZilla:
- Left panel: navigate to your published folder (e.g., bin\Release\net8.0\publish)
- Right panel: navigate to /site/wwwroot/
- Delete everything in /site/wwwroot/ (if it’s a new deployment or update).
- Drag and drop all the files from your local folder to /site/wwwroot/.
- In FileZilla:
Verify Deployment
- Go to the Azure Portal → your App Service.
- Click Browse or go to https://<yourwebappname>.azurewebsites.net.
- Your app should now be live.
Summary
Deploying ASP.NET Core apps to Azure App Service is straightforward and scalable. Whether you're using Visual Studio or GitHub CI/CD, Azure makes it easy to get your apps online with minimal effort.
Thanks