Create an ASP.NET web app in Azure

Publish to Azure

In the Solution Explorer, right-click the myFirstAzureWebApp project and select Publish.

Publish from Solution Explorer

Make sure that Microsoft Azure App Service is selected and select Publish.

Publish from project overview page

This opens the Create App Service dialog, which helps you create all the necessary Azure resources to run the ASP.NET web app in Azure.

Sign in to Azure

In the Create App Service dialog, select Add an account, and sign in to your Azure subscription. If you’re already signed in, select the account containing the desired subscription from the dropdown.

If you’re already signed in, don’t select Create yet.

Sign in to Azure

Create a resource group

A resource group is a logical container into which Azure resources like web apps, databases, and storage accounts are deployed and managed.

Next to Resource Group, select New.

Name the resource group myResourceGroup and select OK.

Create an App Service plan

An App Service plan specifies the location, size, and features of the web server farm that hosts your app. You can save money when hosting multiple apps by configuring the web apps to share a single App Service plan.

App Service plans define:

  • Region (for example: North Europe, East US, or Southeast Asia)
  • Instance size (small, medium, or large)
  • Scale count (1 to 20 instances)
  • SKU (Free, Shared, Basic, Standard, or Premium)

Next to App Service Plan, select New.

In the Configure App Service Plan dialog, use the settings in the table following the screenshot.

Create App Service plan

Setting Suggested Value Description
App Service Plan myAppServicePlan Name of the App Service plan.
Location West Europe The datacenter where the web app is hosted.
Size Free Pricing tier determines hosting features.

Select OK.

Create and publish the web app

In Web App Name, type a unique app name (valid characters are a-z, 0-9, and -), or accept the automatically generated unique name. The URL of the web app is http://<app_name>.azurewebsites.net, where <app_name> is your web app name.

Select Create to start creating the Azure resources.

Configure web app name

Once the wizard completes, it publishes the ASP.NET web app to Azure, and then launches the app in the default browser.

Published ASP.NET web app in Azure

The web app name specified in the create and publish step is used as the URL prefix in the format http://<app_name>.azurewebsites.net.

Congratulations, your ASP.NET web app is running live in Azure App Service.


I ran into an issue I have published my web app to Azure