Create App Service Asp.Net Core Web App & Deploy in Azure

As part of PaaS (Platform as a Service), Azure App Service used to deploy web applications of various technologies (Java, .Net, Node.js, PHP, Ruby..etc), mobile apps, and REST APIs without worrying about infrastructure (like hardware, OS, Networking, load balancing,…etc) on preferred platform (Linux or Windows).

In this article, we discuss how to create Asp.Net Core Web Application and how to deploy it to Azure. Open Microsoft Visual Studio 2019 or 2017 => Select ASP.NET Core Web Application and name it as “AzureCoreWebApp”

Select Web Application from available templates.

Build the application and run it.

Now right-click on the project and select publish. Select Azure App Service with Create New option.

Here we must enter our Azure account details, you can create free Azure account for one year. As shown above, we selected “App Service” option on left side which is used to deploy application on Windows platform. If you want to deploy application in Linux, select “App Service Linux”.

Azure App Service requires Resource Group. Visual Studio displays all Resource groups available with the specific Azure account. If we don’t have any resource group available, we can create new one as part of the deployment.

We also need to provide Hosting plan for the deployment. Microsoft Visual Studio 2019 displays all available hosting plans. If there are no hosting plans available with the specific Azure account, visual studio creates new hosting plan with default configuration. We can create hosting plan with required configuration by selecting New button under “Hosting Plan”.

Here Location is the region where you want to deploy your App Service and Size is the hardware capacity.

Once you selected required configuration for your hosting plan, select OK button. Select “Create” button to create App Service Profile.

Now click on Publish button to publish your code to Azure portal, it takes some time to deploy the code. Once deployment is done, it opens application as shown below.

To see this web application in portal, open Azure portal and go to App Services.