asp.net – MSDeploy.exe可以作为管理员连接,但不能连接任何其他Windows帐户

前端之家收集整理的这篇文章主要介绍了asp.net – MSDeploy.exe可以作为管理员连接,但不能连接任何其他Windows帐户前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我正在将MSDeploy集成到我的构建过程中,并且验证问题.以下命令工作正常:
msdeploy -verb:sync -source:appHostConfig="KitchenPC",computerName=192.168.0.3,userName=Administrator,password=secret -dest:package=c:\DeployTest\KPC.zip

但是,这不工作:

msdeploy -verb:sync -source:appHostConfig="KitchenPC",userName=kpcpublish,password=secret -dest:package=c:\DeployTest\KPC.zip

并产生错误

Error Code: ERROR_USER_NOT_ADMIN
More Information: Connected to '192.168.0.11' using the Web Deployment Agent Service,but could not authorize. Make sure you are an administ
rator on '192.168.0.11'.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_NOT_ADMIN.
Error: The remote server returned an error: (401) Unauthorized.
Error count: 1.

我已经按照上面的链接中的说明,任何other docs I could find,几乎都说同样的事情:

>我创建了一个名为kpcpublish的帐户
>我将这个帐号添加到一个名为MSDepSvcUsers的组中,我甚至把这个帐号添加到了管理员
>我右键单击该站点并选择Deploy->配置Web Deploy Publishing并将kpcpublish添加到列表中.它说:

.

06003

必须有一些我失踪的一些步骤,但我根本无法弄清楚可能是什么.

更新:

对于computerName属性使用完整的HTTP路径,我得到错误

Error Code: ERROR_DESTINATION_NOT_REACHABLE More Information: Could
not connect to the remote computer (“192.168.0.3”). On the remote
computer,make sure that Web Deploy is installed and that the required
process (“Web Management Service”) is started. Learn more at:
07001
TINATION_NOT_REACHABLE. Error: Unable to connect to the remote server
Error: A connection attempt Failed because the connected party did not
properly respond after a period of time,or established connection fa
iled because connected host has Failed to respond 192.168.0.3:8192
Error count: 1.

我检查过,Web管理服务确实运行.

另一个更新:

我已经完全铺设了系统,并从头开始重新设置.我没有做过任何事情,只是安装了IIS角色,并确保在管理工具下检查“管理服务”,这是WMSVC运行所必需的.然后安装了Web PI,并安装了“Hosting Providers的推荐配置”,安装Web Deploy 3.0.但是,我确实注意到安装时出现了错误(我相信我最后也遇到了这个错误).看起来像:

我也附上了日志文件here.

然后我尝试手动安装Web Deploy 3.0,但是它已经安装了它.接下来,我直接从http://www.iis.net/download/webdeploy下载了MSI,并以“修复”模式运行.这似乎有效.我也注意到WMSVC服务已经启动并运行.所以这看起来不错.

不过,MSDeploy不会连接.我以为可能是某种防火墙问题,所以我在本地运行它.我尝试使用HTTPS和HTTP连接. HTTPS给我一个错误,HTTP只需2-3分钟就可以超时.

HTTPS:

msdeploy -verb:sync -source:appHostConfig="Default Web Site",computerName=https://STAGING:8172/msdeploy.axd,password=Khorf123 -dest:package=c:\DeleteMe.zip
Info: Using ID 'f3a54096-adc4-4f54-9e4f-ad8fde12edb6' for connections to the remote server.
Error Code: ERROR_CERTIFICATE_VALIDATION_Failed
More Information: Connected to the remote computer ("staging") using the specified process ("Web Management Service"),but could not verify the server's certifi
cate. If you trust the server,connect again and allow untrusted certificates.
Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_CERTIFICATE_VALIDATION_Failed.
Error: The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
Error: The remote certificate is invalid according to the validation procedure.
Error count: 1.

HTTP:

msdeploy -verb:sync -source:appHostConfig="Default Web Site",computerName=http://STAGING:8172/msdeploy.axd,password=Khorf123 -dest:package=c:\DeleteMe.zip
Info: Using ID 'ebee66f0-08e5-4d9d-98ea-0c2e59784895' for connections to the remote server.
Error: Could not complete the request to remote agent URL 'http://staging:8172/msdeploy.axd'.
Error: The operation has timed out
Error count: 1.

解决方法

(更新于2010年3月7日 – 注意:非管理员部署还需要msdeploy.axd后的site = IIS_SITE_NAME,否则连接被视为全局连接,需要管理员访问)

不知道原来是怎么错过的,但你的问题是computerName参数.仅在使用WMSVC时才支持管理员部署,您需要为其指定完整的URL.

尝试以下

msdeploy -verb:sync ^
  -source:appHostConfig="KitchenPC",computerName=https://192.168.0.3:8172/MsDeploy.axd,password=secret,authType=Basic ^ 
  -dest:package=c:\DeployTest\KPC.zip

From the docs

The computer name will be translated to the default Web Deploy URL. For example,computerName=Server1 will become 07001. If the remote service is running with a custom port or URL,you must specify the full URL

from the install instructions

The MSI will not install the Web Management Service handler component if the Web Management Service is not installed; the handler component is necessary for non-administrator deployments

(我找不到一个更明确的规范来源描述WMSVC作为非管理部署的要求)

猜你在找的asp.Net相关文章