Create your first ASP.NET web app in Azure in five minutes
This Quickstart helps you deploy your first ASP.NET web app to Azure App Service in just a few minutes.
Before you start, make sure that the Azure CLI has been installed. For more information, see Azure CLI installation guide.
Log in to Azure
Log in to Azure by running
az login and following the on-screen directions.
Create a resource group
Create a resource group. This is where you put all the Azure resources that you want to manage together, such as the web app and its SQL Database back end.
az group create --location "West Europe" --name myResourceGroup
To see what possible values you can use for
---location, use the
az appservice list-locations Azure CLI command.
Create an App Service plan
Create a "FREE" App Service plan.
az appservice plan create --name my-free-appservice-plan --resource-group myResourceGroup --sku FREE
Create a web app
Create a web app with a unique name in
az appservice web create --name <app_name> --resource-group myResourceGroup --plan my-free-appservice-plan
Deploy sample application
Deploy a sample ASP.NET app from GitHub.
az appservice web source-control config --name <app_name> --resource-group myResourceGroup \ --repo-url "https://github.com/Azure-Samples/app-service-web-dotnet-get-started.git" --branch master --manual-integration
Browse to web app
To see your app running live in Azure, run this command.
az appservice web browse --name <app_name> --resource-group myResourceGroup
Congratulations, your first ASP.NET web app is running live in Azure App Service.
Clean up resources
To remove all the resources created by this QuickStart, run the following command:
az group delete --name myResourceGroup
Explore pre-created Web apps CLI scripts.