目标
我正在尝试使用 azure devops 在远程服务器上安装 IIS。我已经在其他虚拟机服务器上完成了此操作,没有出现任何问题。
问题
运行此阶段时,代理错误,详细信息很少 安装 IIS 时出现代理错误
错误
2020-08-11T19:06:19.1822182Z ##[section]Starting: IIS Web App Manage
2020-08-11T19:06:19.1984662Z ==============================================================================
2020-08-11T19:06:19.1985052Z Task : IIS web app manage
2020-08-11T19:06:19.1985379Z Description : Create or update websites, web apps, virtual directories, or application pools
2020-08-11T19:06:19.1985671Z Version : 0.5.15
2020-08-11T19:06:19.1985908Z Author : Microsoft Corporation
2020-08-11T19:06:19.1986227Z Help : https://learn.microsoft.com/azure/devops/pipelines/tasks/deploy/iis-web-app-management-on-machine-group
2020-08-11T19:06:19.1986625Z ==============================================================================
2020-08-11T19:06:21.2180244Z Installing IIS. This may take few minutes.
2020-08-11T19:06:46.1602426Z ##[error]The request to add or remove features on the specified server failed.
Installation of one or more roles, role services, or features failed.
The source files could not be found.
Use the "Source" option to specify the location of the files that are required to restore the feature. For more information on specifying a source location, see http://go.microsoft.com/fwlink/?LinkId=243077. Error: 0x800f081f
2020-08-11T19:06:46.1908491Z ##[section]Finishing: IIS Web App Manage
舞台设置
steps:
- task: IISWebAppManagementOnMachineGroup@0
displayName: 'Manage IISWebsite'
inputs:
EnableIIS: true
WebsiteName: 'Default Web Site'
AddBinding: true
Bindings: '{"bindings":[{"protocol":"http","ipAddress":"All Unassigned","port":"80","hostname":"","sslThumbprint":"","sniFlag":false}]}'
CreateOrUpdateAppPoolForWebsite: true
AppPoolNameForWebsite: default
最佳答案
我通过停止尝试使用预构建的 IIS Web 应用程序管理工具解决了这个问题,最终只是通过 power shell 命令安装 iis
Install-WindowsFeature -name Web-Server -IncludeManagementTools
关于Azure 部署池代理无法安装 IIS,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63387634/