- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
有一个很棒的 PDC 演讲 available here来自 Vishal Joshi,其中描述了 Visual Studio 2010 中的新 MSDEPLOY 功能 - 以及如何在 TFS 中部署应用程序。 (Scott Hanselman 也发表了精彩的演讲,但他没有讨论 TFS)。
您可以使用 TFS2010 中的 MSBUILD 调用 MSDEPLOY 将包部署到 IIS。这是通过 MSBUILD 的参数来完成的。
演讲解释了一些命令行参数,例如:
/p:DeployOnBuild
/p:DeployTarget=MsDeployPublish
/p:CreatePackageOnPublish=True
/p:MSDeployPublishMethod=InProc
/p:MSDeployServiceURL=localhost
/p:DeployIISAppPath="Default Web Site"
但是这方面的文档在哪里 - 我找不到任何文档?
我花了一整天的时间试图让它工作,但无法完全正确,并不断出现各种错误。如果我运行包的 cmd
文件,它就会完美部署。如果我通过 Visual Studio 运行 WebDeploy,它也可以完美运行。
但我希望使用这些参数通过 msbuild
运行整个部署,而不是单独调用 msdeploy
或运行包 .cmd
文件。我怎样才能做到这一点?
Web 部署代理服务
。我还在 IIS 下运行管理服务。我尝试过同时使用两者。
<小时/>
我正在使用的参数:
/p:DeployOnBuild=True
/p:DeployTarget=MsDeployPublish
/p:Configuration=Release
/p:CreatePackageOnPublish=True
/p:DeployIisAppPath=staging.example.com
/p:MsDeployServiceUrl=https://staging.example.com:8172/msdeploy.axd
/p:AllowUntrustedCertificate=True
给我:
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets (2660): VsMsdeploy 失败。(远程代理 (URL https://staging.example.com:8172/msdeploy.axd?site=staging.example.com ) 无法已联系。请确保目标计算机上安装并启动了远程代理服务。)错误详细信息:无法联系远程代理(URL https://staging.example.com:8172/msdeploy.axd?site=staging.example.com)。确保目标计算机上安装并启动了远程代理服务。收到了不支持的回复。响应 header “MSDeploy.Response”为“”,但预期为“v1”。远程服务器返回错误:(401) 未经授权。
最佳答案
好的 - 这就是我最终所做的。或多或少,关注Simon Weaver的帖子在此线程/问题中。
但是当谈到 MSBuild 设置时..这里大多数人都使用以下设置:/p:MSDeployPublishMethod=RemoteAgent
,这对于 IIS7 来说不正确。使用此设置意味着 TFS 尝试连接到以下 URL:https://your-server-name/MSDEPLOYAGENTSERVICE
但要访问该 URL,进行身份验证的用户必须是管理员。这是 splinter 的。 (并且您需要勾选“管理员覆盖规则”)。我认为这个网址适用于 IIS6。
以下是您尝试使用 RemoteAgent 连接时的标准错误消息:-
C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets (3588): Web deployment task failed.(Remote agent (URL http://your-web-server/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://your-web-server/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.
所以..您需要将您的MSDeployPublishMethod
更改为:
/p:MSDeployPublishMethod=WMSVC
WMSVC
代表 Windows 管理器服务。它基本上是远程代理的更新包装器,但现在允许我们正确提供用户名和密码..其中用户不必是管理员! (高兴!)现在您可以正确设置您想要访问的用户..每个网站..
它现在还尝试访问 URL:https://your-web-server:8172/MsDeploy.axd
<-- 这正是 Visual Studio 2010 发布的内容
窗口确实如此! (天哪 -> 便士滴!!繁荣!)
这是我的最终 MSBuild 设置:
/p:DeployOnBuild=True
/p:DeployTarget=MSDeployPublish
/p:MSDeployPublishMethod=WMSVC
/p:MsDeployServiceUrl=your-server-name
/p:DeployIISAppPath=name-of-the-website-in-iis7
/p:username=AppianMedia\some-domain-user
/p:password=JonSkeet<3<3<3
/p:AllowUntrustedCertificate=True
注意到用户名中有域名吗?你需要那个,就在那里。另外,在我的图片中,我已允许我们的域用户访问该网站进行管理。因此,我添加的新用户帐户 (TFSBuildService) 具有 Domain Users
组的成员资格...这就是一切的工作原理。
现在 - 如果你读完了所有这些,请养一只哈哈猫(因为它们太 2007 年了)....
关于visual-studio-2010 - 如何让 TFS2010 通过 MSBUILD 为我运行 MSDEPLOY?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2636153/
我知道 the -skip parameter ,但是有没有办法告诉 MSDeploy 跳过多个目录?多次调用参数似乎不起作用。 最佳答案 如果您的文件夹C:\Data\Personal\My Rep
我们正在尝试使用 Web Deploy 来改进我们的部署。 一切都在内部运行,但一旦我们尝试部署到我们的在线环境,msdeploy 就会挂起大于 1 MB 的文件。 如果我们删除这些文件,同步将与 m
任何人都可以确认(最好通过文档链接)在文件同步之前是否完整上传了 MSDeploy 包,或者同步是否发生在 msdeploy.exe 和 msdeploy.axd 之间(仅上传修改过的文件)? 或者,
使用 msdeploy 和 msdeploy.axd 处理程序时,任何部署到我的远程服务器的尝试都会遇到 401 未授权错误,并且服务器会记录 IISWMSVC_AUTHORIZATION_SERVE
我向 msdeploy 传递了几个跳过参数,以便不同步(删除和更新)某些目录和文件 -skip:skipAction='Update',objectName='filePath',absoluteP
我可以使用MSDeploy的配置转换机制来转换其他文件吗? 最佳答案 (另一种方法) msdeploy 打包是在项目的 MSbuild 运行期间调用的。 TransformXml 是 .csproj
有人可以解释(比 technet/msdn 文档更好)汽车供应商究竟是做什么的,它是如何工作的,以及何时使用它。 这与 Web 部署有关。我看过很多指定 -dest:auto 的文档,但对我来说并没有
我有一个 Web Deploy 3.5 包,我想将其部署到远程服务器。如何在 MSDeploy.exe 命令行上指定站点名称? 这是我到目前为止所拥有的: C:\Program Files (x86)
是否可以将文件夹(纯 Html 文件)的内容部署到远程 IIS6/7 服务器上的特定 Web 应用程序? 以下命令不会出错,但也不会将任何文件发布到远程服务器: msdeploy.exe -verb
我无法让它工作 call "%MSDeployPath%msdeploy" -verb:sync -source:runCommand='backup.bat param1' -dest:auto,c
我有一个 psake 脚本来管理我的部署,过程如下: 编译并运行测试 使用 msbuild 生成部署包 检查我们是在内部还是外部部署 如果是内部的,则执行生成的cmd文件 如果是外部的,则提示输入用户
我已经为 MVC 项目创建了一个包含 Bamboo 的 CI。构建工作正常,但问题在于使用 msdeploy 进行部署。下面是Bamboo中部署的配置 问题在于发送到 msdeploy 的参数,如下所
我有一个 Web 应用程序,我正在尝试使用 MSDeploy.exe (Web Deploy 2) 将其部署到 Web 服务器上 我尝试了4种情况: 通过VS2010发布方法,设置如下: 发布方式:W
是否可以使用 MSDeploy 修改(或替换)现有站点的 web.config? 最佳答案 可以替换 Web 配置文件的某些部分(使用 xPath 查询或正则表达式指定)。为此,请使用 -declar
我有一个 .zip 包,我想将其从我的开发计算机安装到开发服务器上。所以我使用 msdeploy 来自动执行此操作。 msdeploy.exe -verb:sync -source:package=D
我正在使用 MSDeploy 移动许多 IIS 网站,我遇到了一个问题,我试图在移动过程中包含 3 个注册表项,但并非所有 3 个注册表项都存在于每个网站上。 所以问题是:是否有办法让 MSDeplo
这看起来应该非常简单,但它对我不起作用而且我没有想法。 我想做的就是在使用 msdeploy 部署包时设置物理路径,这样它就不会转到默认的 inetpub\wwwroot 位置。 msdeploy -
我有一个包含大量文件的网站,使用团队构建并通过 Web 部署包进行部署。我遇到的问题是,软件包是从农场的一台机器构建的,时间戳并不总是匹配。默认情况下,Web 部署意味着完整的站点滚动,并且有如此多的
要求:我有 zip 包,需要将其部署到 IIS 下的特定站点(例如 dev.sitename.org)。 之前,我们在默认网站(IIS 下)下有站点,我们使用以下命令来部署它。>>msdeploy -
我已经找到了如何设置应用程序池和默认值 有人知道如何设置“IIS Web应用程序名称”吗?它在 SetParameters.xml 文件中生成为 我可以覆盖SetParameters.xm
我是一名优秀的程序员,十分优秀!