【发布时间】:2020-08-28 11:50:05
【问题描述】:
我正在尝试使用 ARM 模板通过 MSDeploy 部署 Azure Function 应用程序(.NET Core,functions v3),但我几乎每次都遇到此错误。这只是偶尔成功。我的函数应用有 5 个基于计时器的函数,每秒运行一次。我目前正在使用部署槽,当它们位于暂存槽中时,我将我的功能设置为禁用(通过 DisabledAttribute 和槽特定设置)。
我用来部署的 ARM 模板:
{
"apiVersion": "2018-02-01",
"name": "[concat(variables('webAppName'), '/staging')]",
"type": "Microsoft.Web/sites/slots",
"kind": "app",
"location": "[resourceGroup().location]",
"resources": [
{
"apiVersion": "2015-02-01",
"type": "Extensions",
"name": "MSDeploy",
"dependsOn": [
"[concat(resourceId('Microsoft.Web/Sites/', variables('webAppName')), '/slots/staging')]"
],
"properties": {
"packageUri": "[parameters('packageUrl')]"
}
}
]
}
ARM-MSDeploy Deploy Failed: 'Microsoft.Web.Deployment.DeploymentDetailedUnauthorizedAccessException: Unable to perform the operation ("Delete File") for the specified directory ("D:\home\site\wwwroot\bin\MyAssembly.dll"). This can occur if the server administrator has not authorized this operation for the user credentials you are using. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_INSUFFICIENT_ACCESS_TO_SITE_FOLDER. ---> Microsoft.Web.Deployment.DeploymentException: The error code was 0x80070005. ---> System.UnauthorizedAccessException: Access to the path 'D:\home\site\wwwroot\bin\MyAssembly.dll' is denied.
如何阻止此错误发生?
【问题讨论】:
-
欢迎来到 Stackoverflow。通过使您的问题更具体,您可以获得更好的答复。
标签: azure-functions