Devops 发布失败并出现错误:“找不到驱动器。名为“X”的驱动器不存在。”
- task: IISWebAppManagementOnMachineGroup@0
inputs:
EnableIIS: true
WebsiteName:
WebsitePhysicalPath: 'X:\iis\abc.com'
WebsitePhysicalPathAuth: WebsiteWindowsAuth
WebsiteAuthUserName:
WebsiteAuthUserPassword:
AddBinding: true
Bindings: '{"bindings":[{"protocol":"https","ipAddress":"All Unassigned","port":"443","hostname":"","sslThumbprint":"","sniFlag":true}]}'
CreateOrUpdateAppPoolForWebsite: true
ConfigureAuthenticationForWebsite: true
AppPoolNameForWebsite:
AnonymousAuthenticationForWebsite: true
WindowsAuthenticationForWebsite: false
它尝试访问的服务器具有可用的位置,但我仍然看到此错误。
您可以尝试检查以下事项来解决问题:
首先确保驱动器“
X
”确实存在于Windows代理计算机上。
驱动程序可能需要Windows代理机器的系统管理员角色才能访问。尝试以下任一方法。
在 Windows 代理计算机上安装/导入 PowerShell 模块“
WebAdministration
”。
Import-Module ServerManager
Add-WindowsFeature Web-Scripting-Tools
在
IISWebAppManagementOnMachineGroup@0
任务中,设置使用系统管理员的身份验证来访问网站物理路径。
设置代理(自托管代理)使用系统管理员的 Windows 用户名和密码作为身份验证。