在Azure Devops Pipeline中进行部署之前,如何在目标Windows服务器上启动/停止IIS [英] How to Start/Stop IIS on the target Windows server before deployment in Azure Devops Pipeline
问题描述
我在Azure Devops中创建了启动和停止IIS网站的步骤,但失败并显示以下错误消息:
I created the step in Azure Devops to Start and Stop IIS Website but it is failing with below error message:
** 2020-05-23T10:28:04.7393424Z ## [section]开始:开始 2020-05-23T10:28:04.7659676Z
**2020-05-23T10:28:04.7393424Z ##[section]Starting: Start 2020-05-23T10:28:04.7659676Z
2020-05-23T10:28:06.5436980Z ## [命令]"C:\ Windows \ system32 \ inetsrv \ appcmd.exe"开始站点/site.name:taxrpt-deva" 2020-05-23T10:28:06.6132349Z错误(消息:W3SVC服务不可用-尝试先启动该服务.) 2020-05-23T10:28:06.7434786Z ## [错误]进程'appcmd.exe'退出,代码为'50'. 2020-05-23T10:28:06.7680874Z ## [section]完成:开始 **
2020-05-23T10:28:06.5436980Z ##[command]"C:\Windows\system32\inetsrv\appcmd.exe" start site /site.name:"taxrpt-deva" 2020-05-23T10:28:06.6132349Z ERROR ( message:The W3SVC service is not available - try starting the service first. ) 2020-05-23T10:28:06.7434786Z ##[error]Process 'appcmd.exe' exited with code '50'. 2020-05-23T10:28:06.7680874Z ##[section]Finishing: Start **
推荐答案
在Azure Devops Pipeline中进行部署之前,如何在目标Windows服务器上启动/停止IIS
How to Start/Stop IIS on the target Windows server before deployment in Azure Devops Pipeline
根据您提供的图像,您正在使用不推荐使用 IIS Web App管理任务:
According to the image you provided, you are using the Deprecated task IIS Web App manage:
To resolve this issue, please try to use the task WinRM - IIS Web App Management.
希望这会有所帮助.
这篇关于在Azure Devops Pipeline中进行部署之前,如何在目标Windows服务器上启动/停止IIS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!