azure - Azure 应用服务部署版本 4 - ERROR_USER_NOT_AUTHORIZED_FOR_CREATEAPP

标签 azure azure-web-app-service azure-pipelines-release-pipeline

这是 this question 的后续问题。原始问题的答案对我有帮助,但我被困在其他地方。提醒一下,我想使用发布配置文件部署我的应用程序。我在 Azure 中的 Web 应用程序在 wwwroot 中有两个子文件夹,其中之一称为 backend。我想将我的应用程序部署到该文件夹​​。我不确定为什么 msdeploy 想要创建任何东西,因为 Web 应用程序已经存在 - 我只需要在 backend 文件夹中获取工件。

以下是日志的相关部分(其中一些名称更改为 xyz):

2018-06-14T09:19:25.0295238Z Start executing msdeploy.exe

2018-06-14T09:19:25.0323018Z "C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -source:package='D:\a\r1\a\artifacts\drop\xyz.zip' -dest:auto,computerName="https://xyz.scm.azurewebsites.net:443/msdeploy.axd?site=xyz/backend",userName="$xyz",password="***",authtype="basic",includeAcls="False" -verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -setParamFile:"D:\a\r1\a\artifacts\drop\xyz.SetParameters.xml" -enableRule:DoNotDeleteRule -retryAttempts:6 -retryInterval:10000

2018-06-14T09:19:25.6154385Z Info: Using ID '89f1210b-39ba-4758-b7ee-76a06407a503' for connections to the remote server.

2018-06-14T09:19:28.0800802Z Info: Creating application (Default Web Site)

2018-06-14T09:19:28.2012951Z ##[debug]rc:1

2018-06-14T09:19:28.2013216Z ##[debug]rc:1

2018-06-14T09:19:28.2013360Z ##[debug]success:false

2018-06-14T09:19:28.2013523Z ##[debug]success:false

2018-06-14T09:19:28.2073234Z ##[error]Failed to deploy web package to App Service.

2018-06-14T09:19:28.2081930Z ##[debug]Processed: ##vso[task.issue type=error;]Failed to deploy web package to App Service.

2018-06-14T09:19:28.2082198Z ##[debug]{}

2018-06-14T09:19:28.2082470Z ##[debug]System.DefaultWorkingDirectory=D:\a\r1\a

2018-06-14T09:19:28.2083178Z ##[error]Error Code: ERROR_USER_NOT_AUTHORIZED_FOR_CREATEAPP More Information: Could not complete an operation with the specified provider ("createApp") when connecting using the Web Management Service. This can occur if the server administrator has not authorized the user for this operation. createApp http://go.microsoft.com/fwlink/?LinkId=178034 Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_AUTHORIZED_FOR_CREATEAPP.

Error count: 1.

最佳答案

我设法解决了这个问题。根据this answer by @starian chen-MSFT ,我需要在 SetParameters.xml 中设置正确的参数。我通过将以下内容添加到我的 Visual Studio 构建任务中来完成此操作:

/p:DeployIisAppPath="xyz"

其中 xyz 是发布配置文件中 DeployIisAppPath 元素的值。

关于azure - Azure 应用服务部署版本 4 - ERROR_USER_NOT_AUTHORIZED_FOR_CREATEAPP,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50854434/

相关文章:

azure - 如何将 Azure Web 应用/Web 作业自定义日志提取到 Azure Monitor 日志分析工作区

azure - 当 Azure 应用程序自动缩放和负载平衡上的 CPU 使用率达到 90% 时,自动重新启动一个实例?

azure - 使用 ARM 模板创建 Azure Bot 服务

azure - 在 Azure 逻辑应用内联代码中使用变量

azure - 无法删除 SQL azure 表

azure - 有没有一种(简单)方法将 AWS Redshift 连接到 Microsoft Azure ML?

python - 在 Azure 应用服务中使用 xgboost 时使用部署时出错

azure-devops - 如何使用 Azure DevOps NuGet 为其他阶段重新运行现有的 Azure DevOps 管道?

azure-devops - 在Azure DevOps发布管道中,如何将最新版本提升到一段时间内没有发布版本的阶段?

firebase - "The provided value for the input parameter ' redirect_uri ' is not valid"使用 firebase