Create an ASP.NET Core Application in Azure

Introduction

In this blog, we will learn how to create azure web app in ASP.NET Core and host website in Microsoft Azure cloud. Here we will demonstrate the step by step process to create ASP.NET Core application and publish it in Microsoft Azure portal. This demonstration is conducted in Microsoft Visual Studio 2017 and ASP.NET Core 2.2. and note that you should have azure log on account.

Create ASP.NET Core Application in Azure

  1. Open Visual Studio and then select Create a new project.

  2. The New Project window will appear, find and choose ASP.NET Core Web Application and confirm that C# is listed in the languages for that choice, then select Next.

  3. Name the application myFirstAzureWebApp,and then Click on OK button

  4. The New ASP.NET Web Application window will appear, make sure authentication is set to No Authentication and you have selected the like in the below image, then click on OK button.

  5. Now your are done with ASP.NET core web application cretion, write whatever you want to code then from the Visual Studio menu, select Debug > Start Without Debugging to run the web app locally.

build an asp net web application

Create ASP.NET Core Application in Azure

Publish ASP.NET Core Application in Azure

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

  2. Choose App Service and select Create profile.

  3. In App Service Create new (If you're already signed in, don't select Create yet.), your options depend on whether you're signed in to Azure already and whether you havea Visual Studio account linked to an Azure account.

  4. Select either Add an account or Sign in to sign in to your Azure subscription. If you'realready signed in, select the accountyou want.

  5. For Resource group, select New. In New resource group name,enter myResourceGroup or if you have already created resource group select resource group then select OK.

  6. For to Hosting Plan, select New. In the Configure Hosting Plan dialog,Enter appropriate Hosting plan name , select location and size values ,and then select OK. Here I have ginev 'myappseviceplan' as Hosting Plan, West Europe as location and for size i have selected free.

  7. In Name,enter a uniqueapp namethat includes only the valid characters are a-z , A-Z , 0-9 ,and - . You can accept the automatically generated unique name. The URL of the web app is http://.azurewebsites.net , where is your app name.

  8. Select Create to start creating the Azureresources, oncethe wizard completes, the Azure resources are created for you and you are ready to publish.

  9. In the Publish page,click Publish. Visual Studio builds, packages,and publishes the app to Azure, and then launches the app in the default browser.

deploy asp.net core web api to azure

Publish an ASP.NET Core Application in Azure

Resource Group

A resource group is a logical container into which Azureresources like web apps, databases,and storage accounts are deployed and managed. For example, you can chooseto delete the entire resource group in one simple step later.

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:

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

Related Articles

  1. Restore Database to Microsoft Azure Blog
  2. Backup SQL Database to the Azure Blob
  3. Creating a simple ASP.NET Web Service
  4. Creating controller for File Upload
  5. AngularJS CRUD Operation
  6. Creating an AngularJS Application

Thanks

Kailash Chandra Behera

An IT Professional with 12 years experience in development life cycle in windows, service and Web based application using Microsoft.Net technologies. Proven record of developing all phases of projects in Microsoft.Net technology from initiation to closure aligning with the company's Business objectives to drive process improvements, competitive advantage and bottom-line gains. -> Good exposure of independently working and developing multiple projects ->Committed to efficient and effective development of projects in a fast-paced and deadline driver environment. Skill :- Develop and design projects in various technologies of Microsoft Technology. Total IT Experience- 13+

Previous Post Next Post

نموذج الاتصال