msdeploy`问题(在远程计算机上处​​理请求时发生错误。)

时间:2020-02-25 12:13:55

标签: c# .net windows iis msdeploy

我已经尝试了以下方法,使用Jenkins和msdeploy将.NET Framework 4.5应用程序部署到远程Windows服务器:

def deployDev(folder, virtualDirectory)
{
bat "\"C:\\Program Files\\IIS\\Microsoft Web Deploy V3\\msdeploy.exe\" -verb:sync -allowUntrusted -source:package=\"${WORKSPACE}\\DIST\\Package\\${virtualDirectory}.zip\" -dest:auto=\"Default%%20Web%%20Site/${virtualDirectory}\",computerName=\"https://XX-XXX-XX:8172/msdeploy.axd?site=Default%%20Web%%20Site\" -enablerule:AppOffline -setParam:name=\"IIS Web Application Name\",value=\"Default Web Site\\${virtualDirectory}\" -verbose -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension"
}

在部署时出现以下错误:

14:29:53  Verbose: Source createApp (E:\Jenkins\slaves\AsoModernisation\workspace\ASO2_master\Aso2\obj\Debug\Package\PackageTmp) does not match destination (Default Web Site\Aso2) differing in attributes (isDest['False','True']). Update pending.
14:29:53  Verbose: Update operation on **createApp** (E:\Jenkins\slaves\AsoModernisation\workspace\ASO2_master\Aso2\obj\Debug\Package\PackageTmp) skipped because of rule ApplicationExistsRule.
14:29:53  Verbose: Delete operation on filePath (Default Web Site\Aso2\App_Offline.htm) skipped because of rule AppOffline.
14:29:53  Verbose: Source **setAcl** (E:\Jenkins\slaves\AsoModernisation\workspace\ASO2_master\Aso2\obj\Debug\Package\PackageTmp) does not match destination (Default Web Site\Aso2) differing in attributes (isDest['False','True'],setAclUser,setAclAccess). Update pending.
14:29:53  Info: Adding ACLs for path (Default Web Site\Aso2)
14:29:53  Verbose: Parameter entry 'IIS Web Application Name/1' is applicable to 'iisApp/E:\Jenkins\slaves\AsoModernisation\workspace\ASO2_master\Aso2\obj\Debug\Package\PackageTmp' because of its scope.
14:29:53  Verbose: Parameter entry 'IIS Web Application Name/2' is applicable to 'setAcl/E:\Jenkins\slaves\AsoModernisation\workspace\ASO2_master\Aso2\obj\Debug\Package\PackageTmp' because of its scope.
14:29:53  Verbose: Parameter entry 'IIS Web Application Name/2' is applicable to 'setAcl/E:\Jenkins\slaves\AsoModernisation\workspace\ASO2_master\Aso2\obj\Debug\Package\PackageTmp' because of its scope.
14:29:53  Verbose: Parameter entry 'Add write permission to App_Data Folder/1' is applicable to 'setAcl/E:\Jenkins\slaves\AsoModernisation\workspace\ASO2_master\Aso2\obj\Debug\Package\PackageTmp\App_Data' because of its scope.
14:29:53  Error: (21/02/2020 14:29:53) An error occurred when the request was processed on the remote computer.
14:29:53  Error: The server experienced an issue processing the request. Contact the server administrator for more information.
14:29:53  Error count: 1.

我打开了端口8172,检查了用户权限,尝试重新安装msdeploy(v3.6),添加了IIS管理器权限,在默认网站下创建了池和虚拟目录。

有人对此有何建议?使用createApp或setAcl会导致此问题吗?

1 个答案:

答案 0 :(得分:1)

首先,确保在两台计算机上都安装了管理服务。

enter image description here

它正在运行并设置Windows和iis凭据。

enter image description here

并打开端口8172。

在坐位上设置iis Manager用户。

enter image description here

配置Web部署发布设置。

enter image description here

使用IIS生成的配置文件并复制发布配置文件。

您可以使用配置文件发布应用程序。

enter image description here

以管理员身份运行Visual Studio。

并在发布网站时使用配置文件。

enter image description here