使用 MSDEPLOY 部署 Web 包 [英] Deploying web packages with MSDEPLOY

查看:23
本文介绍了使用 MSDEPLOY 部署 Web 包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经构建了我的包并阅读了这个文档@ http://www.asp.net/web-forms/overview/deployment/web-deployment-in-the-enterprise/deploying-web-packages

I've built my packages and read through this docs @ http://www.asp.net/web-forms/overview/deployment/web-deployment-in-the-enterprise/deploying-web-packages

这似乎表明问题应该从这里开始相对简单,因为说明清楚地表明......

And it seems to suggest that the problem should be relatively simple from here as the instructions clearly show ...

[project name].deploy.cmd [/T | /Y]
                          [/M:<computer name>]
                          [/A:<Basic | NTLM>]
                          [/U:<user name>]
                          [/P:<password>]
                          [/L]
                          [/G:<true | false>]
                          [Additional MSDeploy.exe flags]

.. 所以,没问题,我想我会像这样给出命令参数...

.. so, no problem I thought I will give the command params like this ...

myproj.deploy.cmd /Y /M:test.foo.com /A:basic /U:<my user> /P:<my pass>

... user 和 pass 是我服务器上的管理员帐户.

... where the user and pass are an admin account on my server.

由于某种原因,这会导致 401 ...

For some reason though this results in a 401 ...

Error code: EEROR_USER_NOT_ADMIN
More Information: Connected to 'server' using the Web Deployment Agent Service but could not authorize. Make sure you are an administrator on 'server'

...好吧,我使用了我的管理员凭据,与我在 VS 中用于一键部署的凭据相同,它们在 VS 中工作,那么为什么在推送包时它们不在命令行上工作?

... well, I used my admin credentials, the same ones I used with VS for the one click deploy and they worked in VS so how come they aren't working on the command line when pushing the package?

...

我查看了日志,检查了它正在生成的 ms deploy 命令,并决定完全跳过 cmd 文件,直接自己进行 ms deploy.

I looked through the logs, checked out the ms deploy command it was generating and decided to skip the cmd file altogether and go straight to ms deploy myself.

我找到了它正在生成的命令并将其清理为类似这样的东西......

I found the command it was generating and cleaned it up to something like this ...

msdeploy.exe
  -source:package='..package.zip' 
  -dest:auto,computerName=test.foo.com,userName=<me>,password=<my pass>,authtype=basic,includeAcls=False 
  -verb:sync 
  -disableLink:AppPoolExtension 
  -disableLink:ContentExtension 
  -disableLink:CertificateExtension 

显然,我在这种情况下使用的帐户不是管理员(完全是谎言,或者我可能遗漏了什么).

Apparently my account when used in this context is not an admin (a total lie or perhaps I missed something).

这是 technet 对此的评价:https://technet.microsoft.com/en-gb/library/dd569106(v=ws.10).aspx

here's what technet has to say on it: https://technet.microsoft.com/en-gb/library/dd569106(v=ws.10).aspx

链接到此:https://technet.microsoft.com/en-gb/library/dd569001(v=ws.10).aspx

其中规定...

Web 部署工具不执行本地模拟.如果你为用户名和密码提供程序设置提供值,但这样做不为 computerName 指定远程计算机的名称设置,您提供的凭据将无效.

The Web Deployment Tool does not perform local impersonation. If you provide values for the username and password provider settings but do not specify the name of a remote computer for the computerName setting, the credentials that you provide will have no effect.

这是否意味着因为我指定的是域名而不是机器名,所以我指定的凭据已被忽略?

does this mean because I am specifying a domain name and not a machine name the credentials I am specifying have been ignored?

如果是这样……我该怎么做?

If so ... how am I supposed to do this?

推荐答案

无论如何显然没有记录...答案是...

Apprently undocumented anyway ... the answer is ...

您无法在同一台机器上运行与 MSDeploy 服务对话的 MS deploy 命令.

You can't run MS deploy commands that talk to the MSDeploy service on the same machine.

不知道为什么,这没有任何意义,但是即使部署到我遇到问题的同一个机器上,采用相同的命令并在另一个机器上执行它似乎也可以正常工作.

No idea why, this makes no sense, but taking the same command and executing it on another box seems to work fine even when deploying to the same box I had the issue on.

微软干得好……让团队服务管理员的生活成为梦想!

Well done Microsoft ... way to make a Team Services Admins life a dream!

这篇关于使用 MSDEPLOY 部署 Web 包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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