Create an ASP.NET web app
- Open Visual Studio and then select Create a new project.
- In Create a new project, find, and select ASP.NET Core Web App, then select Next.
- In Configure your new project, name the application MyFirstAzureWebApp, and then select Next.
- Select .NET 6.0 (Long-term support).
- Ensure Authentication Type is set to None. Select Create.
- From the Visual Studio menu, select Debug > Start Without Debugging to run the web app locally.
Publish your web app
- In Solution Explorer, right-click the MyFirstAzureWebApp project and select Publish.
- In Publish, select Azure and then Next.
- Choose the Specific target, either Azure App Service (Linux) or Azure App Service (Windows). Then, select Next.
- Your options depend on whether you’re signed in to Azure already and whether you have a Visual Studio account linked to an Azure account. Select either Add an account or Sign in to sign in to your Azure subscription. If you’re already signed in, select the account you want.
- To the right of App Service instances, select +.
- For Subscription, accept the subscription that is listed or select a new one from the drop-down list.
- For Resource group, select New. In New resource group name, enter myResourceGroup and select OK.
- For Hosting Plan, select New.
- In the Hosting Plan: Create new dialog, enter the values specified in the following table:
Setting Suggested value Description Hosting Plan MyFirstAzureWebAppPlan Name of the App Service plan. Location West Europe The datacenter where the web app is hosted. Size Free Pricing tier determines hosting features.
- In Name, enter a unique app name that includes only the valid characters are
-. You can accept the automatically generated unique name. The URL of the web app is
<app-name>is your app name.
- Select Create to create the Azure resources.
Once the wizard completes, the Azure resources are created for you and you’re ready to publish your ASP.NET Core project.
- In the Publish dialog, ensure your new App Service app is selected in App Service instance, then select Finish. Visual Studio creates a publish profile for you for the selected App Service app.
- In the Publish page, select Publish. If you see a warning message, select Continue.
You’ll see the ASP.NET Core 6.0 web app displayed in the page.
Manage the Azure app
- To manage your web app, go to the Azure portal, and search for and select App Services.
- On the App Services page, select the name of your web app.
- The Overview page for your web app, contains options for basic management like browse, stop, start, restart, and delete. The left menu provides further pages for configuring your app.