我正在尝试使用 msbuild/webdeploy 和 teamcity 部署到 IIS。但是,我收到了 ERROR_USER_UNAUTHORIZED 错误消息和指向iis.net 上的此页面。
我正在使用 Web 管理服务来执行此操作,并且可以验证用户名和密码是否存在(我可以使用该组合登录服务器)、站点是否存在以及用户是否具有 IIS 管理器权限:
那么我错过了什么?
编辑:新截图来回答@dirt:
答案1
就在您的屏幕截图中:“该服务器配置为仅接受具有 Windows 凭据的帐户的连接。“。
主级别 IIS 管理器 > 管理服务 > 允许 Windows 和 IIS 凭据
还要确保已将用户添加到服务器级别 IIS 管理器用户和站点级别 IIS 管理器权限:
服务器等级:
站点级别:
最后检查这个页面:http://www.iis.net/learn/publish/troubleshooting-web-deploy/web-deploy-error-codes
ERROR_USER_UNAUTHORIZED
Diagnosis - This error code can surface because of a number of different reasons. It typically indicates an authentication or authorization problem, and can happen because of any of thee following reasons:
User does not exist
User does not have IIS Manager access to site if connecting using Web Management Service
Site does not exist
Password is incorrect
Resolution - If connecting using the Web Management Service:
Verify that the username and password are correct
Verify that the site exists
Verify that the user has IIS Manager Permissions to the site's scope
Resolution - If connecting using the Remote Agent Service:
Verify that the username and password are correct
Verify that the user account you specified is a member of the Administrators group on the remote computer. NOTE: If you are not using the built-in administrator, create a new group called the "MSDepSvcUsers" group and add your new administrator to that group.
Verify that the site exists