# 5 Things you didn't know about Azure App Service

# Run your application on Azure App Service

Azure App Service (opens new window) is a family of Azure services that you use to run your applications. You can use Azure App Service Web Apps (opens new window) to run your websites and APIs and Azure App Service Mobile Apps (opens new window) to run the backend API for your mobile app that supports functionality like working offline. Also, Azure Functions (opens new window) is part of Azure App Service as you can run an Azure Function on an App Service Plan (opens new window).

In this post, we'll discuss 5 relatively unknown things about Azure App Service.

# Prerequisites

If you want to follow along, you'll need the following:

# 1. Back up your App Service and your database

When things go wrong, a backup can save you. You can use a backup of your system to restore it to the way it was before things went wrong. In App Service, you can backup your App Service (opens new window), which backs up all its configuration and settings and also its contents, so the entire application that is deployed to the App Service. And, you can also back up services that are connected to the App Service, like an Azure SQL Database (opens new window) or Azure Storage (opens new window). You can create these backups from the Backups menu in your App Service, as you can see in the image below:

(App Service Backups in the Azure portal)

# 2. Test in production

Deployment slots (opens new window) are a very powerful feature of Azure App Service. They provide additional instances of your service that you can use as test versions of your app or to release with no downtime. Additionally, you can use deployment slots to test in production. When you have a deployment slot configured, you can indicate the percentage of traffic to be routed to the slot. This way, you can, for instance, route 50% of traffic to your deployment slot and 50% to your production slot. This enables you to test a new version of your app to see if and how users use a new feature. You can configure the testing in production feature from the Deployment slots menu.

(Test in production in the Azure portal)

# 3. Implement authentication without changing code

In Azure, you can secure your application with Azure Active Directory (opens new window), which enables users in your organization to authenticate to your application. You can also use Azure Active Directory B2C (opens new window) to allow users from outside your organization to log into your app using external identities, like a Microsoft or Google account. Implementing this type of security involves making changes to your application and configuration. But, with Azure App Service Easy Authentication (opens new window), you can enable authentication with a flip of a switch, without changing any code. The Easy Authentication feature enables you to configure Azure Active Directory authentication, or authentication with other Identity Providers and creates a security layer between users and your application. When Easy Authentication is enabled, users always have to log in to use your app. You can enable Easy Authentication from the Authentication / Authorization menu and configure your authentication method from there.

(App Service Easy Authentication)

# 4. Extend the functionality of you App Service

Your Azure App Service has many capabilities out-of-the-box. But it can do even more. You can extend its functionality by adding extensions (opens new window) to it. When you go to the Extensions menu, you can install extensions, like extensions for monitoring and logging and extensions for certificate management. And there are also extensions for runtimes that aren't supported by default, like Python.

(App Service extensions in the Azure portal)

# 5. Run MySQL In App

You can run a MySQL database in an App Service by using the MySQL In App feature (opens new window). This creates a MySQL database in the filesystem of the App Service and runs the MySQL process. This works well and is a very cost effective way to run a database. The database stays in your App Service, so this is not a good solution for App Services that you need to scale. You can enable this feature from the MySQL In App menu and also configure logging from there. Once it is enabled, you can find the credentials to log into the database in a file called MYSQLCONNSTR_localdb.ini, which you can find in the filesystem of the App Service in the home/data/mysql folder. You can access the filesystem through FTP of via the KUDU Console.

(MySQL In App in the Azure portal)

# Conclusion

Azure App Service (opens new window) provides great services to run your applications in. And App Service comes with lots of features, including backups (opens new window), testing in production (opens new window), Easy authentication (opens new window), extensions (opens new window) and MySQL In App (opens new window). Go and check it out!