Hello Everyone, We are back again with a most exciting and hot topic i.e. deploying web application on Microsoft Azure from various sources known as deployment options in azure whether it’s from Local Git Repository, Visual Studio, Dropbox or any other external repository as you can see below:
Today in this blog post, we will look into one of its menu item i.e. App Services which is a Platform as a Service (PaaS) and provides a highly scalable, self-patching web hosting service.
We will deploy MVC based web application from visual studio to App Services and in concern with it, We will also look into different subscription plans provided by Microsoft Azure for web application.
Let’s get started with the following prerequisites:
- Install Visual Studio 2015/2017 with the following workloads:
- .NET and web development
- Azure development
- If you don’t have an Azure subscription, create a free account before you begin.
You can deploy any type of ASP.NET web app to Azure. For this blog post, I had already created a MVC based ASP.NET application with Authentication set to No as shown below:
Now to publish this app on Azure, right click project in the solution explorer and select Publish.
Make sure that Microsoft Azure App Service is selected and select Publish as shown below.
This opens the Create App Service dialog, which helps you create all the necessary Azure resources to run the ASP.NET web app in Azure.
In the Create App Service dialog, select Add an account, and sign in to your Azure subscription. If you’re already signed in, select the account containing the desired subscription from the dropdown and named the Web App as “testingazureapp” as shown below:
Create a Resource group by selecting Create new resource group option from the dropdown and named it as “testingresourcegroup”. A resource group is a logical container into which Azure resources like web apps, databases, and storage accounts are deployed and managed.
Now create an App Service plan by selecting Create new App Service plan from the dropdown and named it as “testingappserviceplan”. An App Service plan specifies the location, size, and features of the web server farm that hosts your app.
In the Configure App Service Plan dialog, use the settings in the following table as shown below.
Select Region and then Create Database server if it is required in your application and then finally click Create to start creating the Azure resources.
Once the wizard gets completed, our MVC based ASP.NET web app published to Azure, and then launches the app in the browser set as default in our visual studio. The application running on azure can be seen in browser as shown below:
Right now this application is using free subscription or an App Service plan which is enough for testing purpose, but for live environment where we have millions of users for this app then best performance will be our top priority. In order to achieve this we could Scale up app subscription plan by selecting our app from App Services in Microsoft Azure then select Scale up option as shown below:
All the subscription plans will appear with our current application plan highlighted. In our case, free subscription plan is highlighted as shown below.
Choose the subscription plan which best suits your application and then press select, the application will be upgraded running on the selected plan.
I hope you all had learned something very informative through this blog post finding Microsoft Azure as a suitable hosting and manageable platform for your applications.