In this article we will see steps for hosting Web Application in Azure using App Service.
App Service: App Service is used for hosting web applications. We can host dynamic web applications, static websites, API service and mobile applications using App Service. Login first in Azure portal and click on App Service from left menu or from Dashboard to create an App Service.
Now click on Add button on App Service list page.
Below page will appear where you need to enter details of Web Application and you need to select a suitable ‘App Service Plan’.
We have entered ‘LogixnWebApp’ for App Service name. Name should be unique. We are going to deploy code so “Code” is selected in Publish type. You can also select “Docker Container”. Runtime stack denotes .Net runtime version , we have selected ‘.Net Core 3.1’ because we are going to host Asp.Net Core application. In Region drop down you need to select a data center location which is near to your location.
App Service Plan denotes hardware resources required to host our App Service. Based on Operating system selection, Azure already selected “Standard S1”. If you wish, you can change this by clicking on “Change Size” link. Click on “Review+Create” button, after that click on Create button.It will take some time to create App Service. Below is the App Service overview page which we have just created:
URL of our App Service is https://logixnwebapp.azurewebsites.net
For changing the Application settings click on Configuration link from left side menus under Settings tab.
Now our App Service is ready. We will now create Asp.Net Core MVC application. Open Visual Studio and create a new ASP.Net Core MVC project. For creating this project select ASP.Net Core Web Application template as shown below:
Click on Next button and select project location. Click on Create button and after that select MVC template as shown below and create project.
Now we will see steps for hosting it in Azure using App Service. Right click on project in Visual Studio and select ‘Publish’. Below screen will appear,
Click on ‘Select Existing’ under Azure App Service because we already have an App Service and click on ‘Create Profile’ button after that below screen will appear:
You need to login with your Azure credentials in this screen. This screen will fetch Resource Group which we have already created. Expand ‘LogixnResource’ and App Service “LogixnWebApp” will be displayed. Select the App Service and click on ‘OK’ button. Click on ‘Publish’ button on next screen and now Visual studio will start publishing our web application on Azure.
Now access URL http://logixnwebapp.azurewebsites.net from browser after publish activity is finished. Below is the page of our web application hosted on Azure:
In this article we have seen steps for hosting web application using App Service. There will be multiple articles published for Azure. Please like our Facebook page for getting new posts update.