Introduction
In this article we will focus on the below important fetaures of using Azure App services.
- What is App service and when to use Azure App service.
- How to choose the best app service plan for your Azure app service.
- Deploying .NET Core application to Windows based Azure app service.
- Authencation, scaling and other app service features.
Prerequisites
This article assumes you have a basic working knowledge of NET Core and Azure.
Microsft Account is required to log into Azure portal and use any Azure Services.
Implementation
What is Azure App service or Azure Web apps and when should we use app service?
Azure app service is a platform as a service offering by Azure that allows custom web applications to be deployed on the Azure cloud.
Any custom application developed using (.NET,.NET Core, Java, Ruby, Node js, Python) can be easily deployed to Azure app service.
Azure app service model offers the following advantages:
- Customers don't have to manage underlying compute service infrastructure. The underlying infrastructure is managed entirely by Azure. The application will be deployed on VM managed by Azure. Developers can focus only on development without worrying about backend infrastructure.
- It provides features such as auto scalilng and security.
- It has dev ops capablities which inculdes continous deployment.
- Don't need to install any web server.
If your custom application doesn't supports app service than the better alternative is to use Azure VM service.
Chossing the best app service plan for your app services
App service plan is a seperate resource that will be created with your app service.
App service plan and app service go hand in hand.
Free App service plan allows only 10 apps to be deployed with 60 mins of application compute time in one day for all applications.
It means if we have 3 applications deployed on app service using this plan then combined all 3 can be up and running for 60 minutes in a day.
This plan is best suitable for POC or demo purposes.
Shared app service plan allows only 100 apps to be deployed with 240 minutes of application running time in one day for all applications.
It means if we have 3 applications deployed on app service using this plan then combined all 3 can be up and running for 240 minutes in a day.
This plan is best suited for POC or demo purpose.
The basic, standard, premuim and isolated are the best plans for enterprise use per requirments of memory and work loads.
All these plans provides SLA of 99.95%
Deploying .NET Core application to Azure app service from Visual Studio
Exploring Azure app service
Navigate to your app service and we will see all app services.
All app services are associated with the app service plan.
Navigate to web app details.
At any point of time we can stop web app service and we can resume back whenever needed.
Under left hand side configuration we can configure connection string here instead of specfiying it in web.config.
This is securely stored using encryption and can be retrieved in .NET code and passed over encrypted channels.
In case the application has not been used by users for a long amount of time it goes into sleep mode by default.
In such scenerios if we want applications to be always awake we can enable the always on mode.
If our application supports web sockets we can enable web sockets here.
If we want to debug applications deployed on Azure services using Visual Studio enable remote debugging and select Visual Studio version.
By default authencation mode will be anonymous. Anyone can access the application with url.
If we want to enable authentication we can configure it in this section.
If we want to validate users based on AD group we can integrate Azure AD. Each time a user tries to access the application they will be redirected to Azure AD and upon successful validation will be redirected back to application.
We can also enable Microsoft account log on option in this user will only need to specify microsoft email id.
At any point of time we can scale up or scale down app service configuration using this feature.
Summary
Through this article we have learned where and how to configure and use Azure app services.
Thanks a lot for reading. I hope you liked this article. Please share your valuable suggestions and feedback. Write in the comment box in case you have any questions. Have a good day!