jenkins - MSDeploy WMSVC 无法在 .net 环境中工作

标签 jenkins msbuild continuous-integration msdeploy

我有一个构建/测试服务器,当前正在运行 Jenkins 以进行持续集成,并且它也充当我的测试服务器,代码将在构建后部署到其中(我希望纠正此问题并在以后将它们分开)预算允许)

我有一个 .NET Web 解决方案(本质上没什么复杂的,只是 Umbraco),我在 SVN 中拥有它,并且 Jenkins 现在正在正确构建。我现在想使用 MSDeploy 将其部署到同一服务器上。构建完成后,生成了包,但部署失败并出现错误

ERROR_DESTINATION_NOT_REACHABLE: Web deployment task failed. (Could not connect to the remote computer ("xxxxx.xxxxxxx.xxx.xxxx"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started

这是 Jenkins 使用的我的 msbuild 参数

/P:Configuration=Release 
/P:DeployOnBuild=True 
/P:MSDeployPublishMethod=WMSVC 
/P:DeployTarget=MSDeployPublish 
/P:PublishProfile=GetSomePixels 
/P:MsDeployServiceUrl=https://build.######## 
/P:AllowUntrustedCertificate=True 
/P:CreatePackageOnPublish=True 
/P:UserName=####### 
/P:Password=########

我已检查服务器,Web 管理服务正在运行并且正在手动启动

我还进入了 IIS 8 管理器(服务器 2012)并选中了“管理服务”下的“允许远程连接”框。重新启动 IIS 和 WMSVC,但仍然无法工作。

如果我去https://myserver.co.uk:8172/MsDeploy.axd在浏览器中它会解析(向您发出有关不受信任的证书的警告),然后显示空白页面。

有人知道我能做什么吗?我认为这可能与防火墙相关,尽管它为 8172 的 Windows 防火墙添加了一个异常(exception),但我已经关闭了整个防火墙以完全排除该情况,但仍然没有运气。

已在服务器上运行此命令以检查其在正确端口上的监听

C:\Users\Administrator>netstat -a |查找str 8172 TCP 0.0.0.0:8172 GSP-BUILD:0 监听 TCP [::]:8172 GSP-BUILD:0 监听

最佳答案

好的,我已经解决了这个问题。看来您必须先激活 Web 管理服务,然后安装 Web 部署,而我则是以相反的方式完成的。我卸载了 WebDeploy 并重新安装了它,重新启动了服务器及其工作

关于jenkins - MSDeploy WMSVC 无法在 .net 环境中工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16708021/

相关文章:

jenkins - sh '' ' <command > '' ' - 三滴答 - 在 Jenkinsfile 中的用途是什么?

azure - 使用 Visual Studio Online 的 vNext 任务将数据库部署到 Azure

xcode - 设置 Xcode build设置终端

visual-studio-2010 - MSBuild - 如何使用 Visual Studio 创建/编辑构建脚本?

c# - MSBuild 要求将 DLL 复制到 .NET 目录和当前构建目录

java - Maven 构建只更改了文件

git - 如何在持续集成构建服务器上使用 git

date - Jenkins - 每个月结束前 2 天运行作业

bash - Jenkins Groovy : how to extract specific number from parameter in method?

ios - 从 jenkins 构建 xcode 项目失败。在命令行中构建时运行正常。为什么?