这是 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/