Managing Kentico Application Settings in Azure App Services

   —   

Azure Web Apps are one of the most widely used options for cloud deployments. This is largely due to their ease of deployment and use, along with their vast customization options. In this blog, I’ll discuss several ways you can manipulate your Azure Web Apps to fit your needs and set up a fool-proof deployment experience for your developers.

Azure Web Apps are one of the most customizable and scalable aspects to the Azure platform by allowing developers to deploy applications quickly and easily using automated tools. Some of their greatest benefits is their flexibility and how easily companies can integrate them into their development processes. With deployment slots, continuous integration, and automation scripts, organizations can tailor their entire development experience around the platform.

One of the best features is the ability to manage application settings for the deployments directly within the Azure portal. While they don’t allow access to the underlying operating system and server, Azure Web Apps do expose a number of settings and configurations developers can leverage within their deployments. These settings include IIS configuration options, setting keys, and connection strings, all of which are typically set specifically for the environment where the application is deployed. In the case of Kentico, these often contain database connection strings, Azure storage account information, and other sensitive information. With managing these keys within the Azure Web App itself, you can simplify managing your Kentico deployments and ensure that only approved personnel have access to sensitive information.

General settings

Under General settings, developers can find a number of IIS-level configuration options. These include the .NET Framework, platform architecture, managed pipeline version, and debugging options. Often, custom and legacy applications require specific configurations in order to function properly and these settings allow developers to ensure the proper architecture is in place for their application.  Additionally, some applications require PHP or Java, both of which can be enabled directly within the portal.

General settings

For Kentico applications, choosing 32-bit or 64-bit may be important, depending on how you’ve architected the solution. Another important setting is ARR Affinity, which can ensure all requests a user makes stay on the same server for the duration of their session. If your Kentico sites always need to be available, enable the Always On feature to make sure the site is running at all times.

App settings

In the App Settings section, developers can enter specific values which will only be applied to the deployment itself. The idea is that any entered key will be injected into the web.config of the deployed application automatically. This allows developers to remove sensitive information from their source-controlled versions of the file and manage them from within the Azure portal. In the event a key exists in the web.config, the value will be dynamically overwritten with the entered value.

App settings

In Kentico deployments, these keys can be used to manage Azure storage account information, CDN paths, and other environment-specific variables.

Connection strings

Much like App settings, the Connection strings section allows developers to enter deployment-specific database credentials. These credentials will be automatically added to the web.config, replacing any existing connections strings, if present.

Connection strings

For Kentico applications, the CMSConnectionString is a great use of these settings. Using the Connection string key, developers can deploy any web.config and have the proper database credentials added automatically by Azure.

Other Settings

In addition to the settings above, Azure Web Apps expose many other aspects of the deployment. These include default documents, handler mappings, and virtual directories. Companies can use these configurations to ensure their application performs and responds correctly based on their specific requirements.

Other settings

Moving Forward

If you haven’t checked out Azure Web Apps, I strongly encourage you to do so. They can greatly simplify your development and deployments. Through the use of the Application Settings capabilities, you can customize each deployment to fit your needs and ensure your sites are running optimally and securely. With the ability to dynamically update values, companies can eliminate the need to store sensitive information in their source control and avoid deploying incorrect configurations. Good luck!

Share this article on   LinkedIn Google+

Bryan Soltis

Hello. I am a Technical Evangelist here at Kentico and will be helping the technical community by providing guidance and best practices for all areas of the product. I might also do some karaoke. We'll see how it the night goes...