Redirect HTTP to HTTPS when using ASP.NET Core in Web App on Linux – Azure App Service

A couple things to consider when implementing HTTP to HTTPS redirect for an ASP.NET Core application running in Web App on Linux – Azure App Service. -Since you are using the .NET Core server to process requests, configuring a redirect rule in .htaccess won’t work the way it does with sites that are closely coupled…

2

Automatically stop (and start) an Azure App Service main site, or disable and re-enable Always On, during Git- / Kudu-based deployment

Let’s say you do GitHub or Bitbucket continuous deployments to an Azure App Service. At some point, deployments start failing, and after a bit of further investigation, you notice in the Kudu deployment logs that a file in use or permissions error is occurring when trying to copy over existing files of the same names….

0

Log in to Azure Resource Manager (ARM) through Kudu to use ARM PowerShell

Azure App Service has Azure Resource Manage (ARM) PowerShell modules installed, which gives you the ability to run ARM PowerShell commands from the Kudu console and WebJobs (and Azure Functions).   In order to use ARM PowerShell within App Service you will need to log in to Azure non-interactively, using a service principal. There are…

0

Using the Azure ARM SDK for Node to get Site Metrics for your App Service

Documentation for using the Azure ARM SDK for Node to get Site Metrics for your App Service can be found here: http://azure.github.io/azure-sdk-for-node/azure-arm-website/latest/Sites.html#getSiteMetrics   Here is sample code for how to get this to return the results as JSON in the console. You can use other  login methods (not just loginWithServicePrincipalSecret), such as interactiveLogin. var msRestAzure =…

0

Samples for using the Azure App Service Kudu REST API to programmatically manage files in your site

Information about the Kudu REST API is found here: https://github.com/projectkudu/kudu/wiki/REST-API The VFS API section contains examples for programmatically managing files and directories in the App Service.   Here is an example (written in PowerShell) for listing the files and folders in the wwwroot folder. $username = “`$websitename”; $password = “password”; <# This is the password…

0

Umbraco logging in Azure App Service

Umbraco is a third-party CMS that can be hosted in Azure App Service. Umbraco has built-in Log4Net logging that can be useful for troubleshooting issues within an Umbraco application. In Azure App Service, these logs can typically be found under D:\home\site\wwwroot\App_Data\Logs. The naming convention for these logs is UmbracoTraceLog.InstanceName.txt . Note: InstanceName refers to a machine instance that hosts your…

0