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

查看:917
本文介绍了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)未经授权。在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.

将以下注册值设置/添加到WMSvc注册码:

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

reg add HKLM\Software\Microsoft \WebManagement\Server / v WindowsAuthenticationEnabled / t REG_DWORD / d 1

回收WMSvc:

net stop wmsvc& net start wmsvc

再试一次。如果不成功,您可以发布msdeploy命令行吗?

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

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

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