Create an MVC Application in Azure

Kailash Chandra Behera | Tuesday, June 16, 2020


In this blog, we will learn how to create azure web app in MVC and host website in Microsoft Azure cloud. Here we will demonstrate the step by step process to create ASP.NET MVC application and publish it in Microsoft Azure portal.

This demonstration is conducted in Microsoft Visual Studio 2017 and ASP.NET MVC5. Note that you should have azure log on account.

Create an MVC 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 Web Application (.NET Framework), then select Next.

  3. Name the application mymvcAzureWebApp,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 MVC 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.

publish website to azure from visual studio 2017

Create an MVC Application in Azure

Publish MVC Application in Azure

  1. In Solution Explorer, right-click the mymvcAzureWebApp 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 account you 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 , 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.

how to publish in azure

Publish MVC Application in Azure

Azure Resource Group( Create an MVC Application in Azure)

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.

Azure App Service Plan ( Create an MVC Application in Azure)

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. Create an ASP.NET Core Application in Azure
  2. Restore Database to Microsoft Azure Blog
  3. Backup SQL Database to the Azure Blob
  4. Creating a simple ASP.NET Web Service
  5. AngularJS CRUD Operation
  6. Creating an AngularJS Application