asp.net - VSTS msdeploy.exe错误: ERROR_USER_NOT_AUTHORIZED_FOR_CONTENTPATH

标签 asp.net azure-devops msdeploy azure-pipelines-release-pipeline

我正在尝试在 VSTS 内创建发布定义,以便在生产服务器上部署 ASP.NET Core 2.0 应用程序。

我正在使用MSDeployAllTheThings扩展:https://marketplace.visualstudio.com/items?itemName=rschiefer.MSDeployAllTheThings

我能够使用相同的配置在 Visual Studio 内进行部署...

VSTS 配置(不起作用)

enter image description here

VSTS 错误

enter image description here

Visual Studio 配置(工作)

enter image description here


你们有什么想法吗?

最佳答案

我在部署到 smarterasp.net 时遇到了同样的问题,并且能够为 Web 部署进行设置:

  1. 您的 Dotnet 构建任务可以使用必要的文件(如 [YourProject].deploy.cmd、[YourProject].zip 等)创建部署包。为此,您可以在构建任务中使用下一个参数:
--configuration $(BuildConfiguration) /p:DeployOnBuild=true /p:WebPublishMethod=Package /p:PackageAsSingleFile=true /p:SkipInvalidConfigurations=true /p:PackageLocation="$(build.artifactstagingdirectory)\"
  • 添加“批处理脚本”任务并在“路径”字段和“参数”中设置 [YourProject].deploy.cmd 的路径:
  • /y /m:$(SmarterAspNet.PublishUrl) -AllowUntrusted /u:$(SmarterAspNet.UserName) /p:$(SmarterAspNet.Password) /a:Basic "-setParam:name='IIS Web Application Name',value='$(SmarterAspNet.SiteName)'" -enableRule:AppOffline
    

    通过这两个主要的 DevOps 任务,我能够将我的应用程序部署到 smarterasp.net

    关于 MSDeployAllTheThings 任务:我删除了它,因为我不再需要它

    关于asp.net - VSTS msdeploy.exe错误: ERROR_USER_NOT_AUTHORIZED_FOR_CONTENTPATH,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48395946/

    相关文章:

    php - 将图像解析为数据[任何语言]

    asp.net - 如何设置特定文件夹的启动页?

    c# - 帮助 Linq 表达式根据字段计数返回字符串列表

    azure - 如何将变量从管道任务传递到 terraform 任务并将其应用到我的 terraform 代码中?

    visual-studio-2012 - 将 TF.exe 与 Team Foundation Service 一起使用?

    iis-7 - 使用 MSDeploy 为包设置应用程序池

    deployment - 向开发人员索要新的应用程序包。该软件包可能与已安装的软件包冲突

    sql - 将此 sql 语句更正为 Insert into、select、delete

    azure - 如何通过 Azure DevOps 将 Blazor 应用程序部署到 Azure

    visual-studio-2012 - 从 VS2012 发布 Web 应用程序正在清除用户内容