Create an ASP.NET Core web app in Azure

Create an ASP.NET Core web app

Azure App Service provides a highly scalable, self-patching web hosting service. This quickstart shows how to deploy your first ASP.NET Core web app to Azure App Service. When you’re finished, you’ll have a resource group that consists of an App Service plan and an App Service app with a deployed web application.

In Visual Studio, create a project by selecting File > New > Project.

In the New Project dialog, select Visual C# > Web > ASP.NET Core Web Application.

Name the application CloudepictAzureWebApplication, and then select OK

You can deploy any type of ASP.NET Core web app to Azure. For this quickstart, select the Web Application template, and make sure authentication is set to No Authentication and no other option is selected Select OK.

From the menu, select Debug > Start without Debugging to run the web app locally.

Launch the publish wizard

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

The publish wizard is automatically launched. Select App Service > Publish to open the Create App Service dialog.

Sign in to Azure

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

Create a resource group, if you dont have

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

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 Hosting Plan, select New.

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

Create and publish the web app

In 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 app name.

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

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

Update the app and redeploy

From the Solution Explorer, open Pages/Index.cshtml.

Replace the two <div> tags with the following code:

<div class=”jumbotron”>

<h1>ASP.NET in Azure for CLOUDEPICT</h1>

<p class=”lead”>This is a simple app that we’ve built that demonstrates how to deploy a .NET app to Azure App Service.</p>

</div>

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.