WebDeploy (401) 未经授权的错误 [英] WebDeploy (401) Unauthorized error

查看:79
本文介绍了WebDeploy (401) 未经授权的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在尝试使用不是目标服务器上的本地管理员的 Windows 用户远程部署应用程序时,使用 NTLM 身份验证从 MsDeploy 收到未经授权的错误.我在目标框中的管理服务委派中设置了规则,并检查了所有提供者.根据此规则,我添加了 2 个具有允许权限的用户('*',以及我正在执行远程部署的 windows 用户).此外,我已在我尝试部署的站点上授予 Windows 用户权限.如果我让 Windows 用户成为目标框上的本地管理员并设置允许管理员绕过规则",则部署工作正常.如果 windows 用户不是本地管理员,我会收到以下错误:

I'm getting an unauthorized error from MsDeploy using NTLM authentication when trying to remotely deploy an application using a windows user who is not a local admin on the destination server. I have setup rules in the Management Service Delegation on the destination box with all providers checked. Under this rule I have added 2 users with allow permissions ('*', and my windows user that is doing the remote deploy). Additionally, I have given the windows user permission on the site I'm trying to deploy. If I make the windows user a local admin on the destination box and set 'Allow administrators to bypass rules', the deploy works correctly. If the windows user is not a local administrator I get the following error:

Web 部署任务失败.(无法联系远程代理(URL http://xxxxxxxx/MSDEPLOYAGENTSERVICE).使确保在目标计算机上安装并启动了远程代理服务.)确保站点名称、用户名和密码正确.如果问题仍未解决,请联系您的本地或服务器管理员.错误详细信息:无法联系远程代理(URL http://xxxxx/MSDEPLOYAGENTSERVICE).确保在目标计算机上安装并启动了远程代理服务.收到了不受支持的响应.响应标头MSDeploy.Response"为V1",但应为v1".远程服务器返回错误:(401) Unauthorized.在 Microsoft.Web.Publishing.targets(3588, 5)

Web deployment task failed.(Remote agent (URL http://xxxxxxxx/MSDEPLOYAGENTSERVICE) could not be contacted. Make sure the remote agent service is installed and started on the target computer.) Make sure the site name, user name, and password are correct. If the issue is not resolved, please contact your local or server administrator. Error details: Remote agent (URL http://xxxxx/MSDEPLOYAGENTSERVICE) could not be contacted. Make sure the remote agent service is installed and started on the target computer. An unsupported response was received. The response header 'MSDeploy.Response' was 'V1' but 'v1' was expected. The remote server returned an error: (401) Unauthorized. in Microsoft.Web.Publishing.targets(3588, 5)

推荐答案

如果您将委派配置为允许管理员绕过规则"并且 msdeploy 命令成功,那么您正在通过 WMSvc,它正在让您通过.否则,从响应看来,WMSvc 正在拒绝您,而您正在回退到 Web Deloy 代理.

If you configure delegation to "Allow administrators to bypass rules" and msdeploy command succeeds, then you are going through WMSvc and it is letting you through. Otherwise, from the response it seems that WMSvc is rejecting you and you are falling back to Web Deloy agent.

将以下 reg 值设置/添加到 WMSvc reg key:

Set/add the following reg value to WMSvc reg key:

reg add HKLMSoftwareMicrosoftWebManagementServer/v WindowsAuthenticationEnabled/t REG_DWORD/d 1

回收 WMSvc:

net stop wmsvc &网络启动wmsvc

再试一次.如果不成功,您可以发布您的 msdeploy 命令行.

Try again. If it doesn't succeed, can you post your msdeploy command line.

这篇关于WebDeploy (401) 未经授权的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆