Azure 部署池代理无法安装 IIS

标签 azure iis installation devops agent

目标

我正在尝试使用 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

舞台设置

enter image description here

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/

相关文章:

c# - 在哪里可以找到 IIS 管理器连接字符串的位置

html - 利用浏览器缓存

azure - Azure "Sql Databases"(托管关系数据库即服务)是否支持 SharePoint 数据库?

windows - crossdomain.xml Windows Azure 的位置

azure - Azure 容器应用服务部署中心 Docker Compose(预览版)中的 Config 是什么

linux - 是否有可用的 NuPIC 预编译镜像?

linux - 无法使用 WSL 2 在 Ubuntu 上安装 hadolint

Azure 表存储 - 我使用了多少数据?

c# - .NET Web api 2 在 IIS 中的某个时间后停止工作

codeigniter - Codeigniter 的 CRON 作业