【问题标题】:WebDeploy runcommand issueWebDeploy 运行命令问题
【发布时间】:2015-04-02 23:34:25
【问题描述】:

我正在尝试使用 WebDeploy V3 部署一个包。 安装过程是在远程计算机上的源文件夹和目标文件夹之间进行同步,并在同步完成后运行某个 powershell 脚本。 正在执行的命令是:

'"C:\Program Files\IIS\Microsoft Web Deploy V3\msdeploy.exe" -verb:sync -source:dirPath='C:\source' -dest:dirPath='D:\destination',computerName=XXX -postSync:runcommand='powershell -inputformat none D:\destination\Install.ps1',successReturnCodes=0'

这会产生以下错误:

Info: Using ID '49edd786-d8a0-4acf-be7b-95dd6e1391cc' for connections to the remote server.  Performing '-postSync'... Info: 
Using ID '5ef9d005-82fa-4811-9f51-1741c8d622de' for connections to the remote server. 
Info: Adding MSDeploy.runCommand (MSDeploy.runCommand). 
Error: (11/28/2012 4:34:24 AM) An error occurred when the request was processed on the remote computer. Error: The entry type 'Unknown' was not expected at this time. The serialization stream may be corrupted.
Error count: 1.
Error during '-postSync'.  Total changes: 0 (0 added, 0 deleted, 0 updated, 0 parameters changed, 0 bytes copied)

在网上搜索这个错误,我没有看到任何人在使用 runco​​mmand 提供程序时遇到它。如果有人遇到类似问题并有想法或建议,我将不胜感激..

【问题讨论】:

    标签: webdeploy


    【解决方案1】:

    据我所见,使用runCommand 执行任意命令行可能有点问题。尝试将命令行移动到 batcmd 文件并提供(完整?)路径。只要您不尝试向其传递任何参数,该文件就会被上传并执行。

    【讨论】:

      【解决方案2】:

      对于这篇文章的未来查看者:在将 runCommand 提供程序用法添加到我的 MyProject.wpp.targets 文件以用于 Web Publishing Pipeline MSBuild 过程后,我遇到了同样的特定错误 (Error: The entry type 'Unknown' was not expected at this time. The serialization stream may be corrupted)。该路径是直接 cmd shell 输入,用于使用attrib -R 清除只读标志。

      在我的例子中,我的构建服务器配置了 WebDeploy 3.0,而部署包的目标服务器配置了 Webdeploy 2.0。将目标服务器升级到 Webdeploy 3.0 后,此特定问题得到解决。

      但是,由于 runCommand 周围的其他错误(在包运行时提供目标可执行文件的正确路径),我的解决方案仍然不能完全正常工作,因此请谨慎对待。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2023-03-15
        • 2018-02-16
        相关资源
        最近更新 更多