Thursday, July 21, 2022

How to Enable Read Write for Deployed Content in Kudus When Using Web Deploy Package

The Build Packages which is packaged as webdeploy and deployed to Azure App service using Kudu, only  have the read access . However, If you want to change content using kudu of Azure app service or stop/start a web job, you would not be able to do so due to not having wright permission. This blog explains how to enable read write permission to content in an app service deployed using a web deploy package.

You would be able to see the read only mode message similar to following image.



Add following script lines to deployment step of YAML pipeline to enable the read write permission.

            enableCustomDeploymenttrue
            DeploymentType'zipDeploy'

Above can be used in a AzureRmWebAppDeployment task as shown below.

        - task: AzureRmWebAppDeployment@4
          displayName: "Deploy to app-windeploy"
          inputs:
            ConnectionType: 'AzureRM'
            azureSubscription: 'AzureServiceConnectionName'
            appType: 'webApp'
            WebAppName: 'app-windeploy'
            deployToSlotOrASE: true
            ResourceGroupName: 'rg-winbuild-linuxdeploy'
            SlotName: 'production'
            packageForLinux: '$(build.artifactstagingdirectory)/src/sampleapp.zip'
            enableCustomDeployment: true
            DeploymentType: 'zipDeploy'

Deploy the package using the pipeline.

Go to Azure app service Kudus. You would be able to see write and read permission enabled.








No comments:

Post a Comment