首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >如何使用MsDeploy在网站内部署子应用

如何使用MsDeploy在网站内部署子应用
EN

Stack Overflow用户
提问于 2012-09-06 21:48:19
回答 2查看 8K关注 0票数 9

我在IIS网站下有一个子应用程序,我可以使用Visual Studio中的发布向导来部署它。

然而,我从我们的构建服务器自动部署,所以我更喜欢直接使用msdeploy.exe。

我可以部署主网站,但尝试部署子应用程序拒绝工作。

这是可行的(www.mymainwebsite.co.uk是IIS网站):

-setParamFile:"www.mymainwebsite.co.uk\obj\Test\Package\www.mymainwebsite.co.uk.SetParameters.xml“

msdeploy.exe msdeploy.exe -dest:auto,computerName='https://testweb1:8172/MsDeploy.axd?site=www.mymainwebsite.co.uk',userName='xxx',password='xxx',authtype='Basic',includeAcls='False‘-verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -disableLink:CertificateExtension -allowUntrustedInfo

这不是(SubApplication是应用程序路径):

-setParamFile:"SubApplication\obj\Test\Package\SubApplication.SetParameters.xml“

msdeploy.exe msdeploy.exe -dest:auto,computerName='https://testweb1:8172/MsDeploy.axd?site=www.mymainwebsite.co.uk/',userName='xxx',password='xxx',authtype='Basic',includeAcls='False‘-verb:sync -disableLink:AppPoolExtension -disableLink:ContentExtension -disableLink:CertificateExtension -disableLink:CertificateExtension -allowUntrustedInfo

错误是:

代码语言:javascript
复制
Error Code: ERROR_USER_UNAUTHORIZED
More Information: Connected to the remote computer ("testweb1") using the Web Management Service, but could not authorize. Make sure that you are using the correct user name and password, that the site you are connecting to exists, and that the credentials represent a user who has permissions to access the site.  Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_USER_UNAUTHORIZED.
Error: The remote server returned an error: (401) Unauthorized.

正如我所说的,这在Visual Studio发布向导中工作,将Site/application属性设置为www.mymainwebsite.co.uk/SubApplication,因此我知道这不是服务器上的权限问题。

我是不是在msdeploy参数中遗漏了什么?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2012-09-10 20:52:05

我在命令行中使用以下命令来设置web应用程序:

代码语言:javascript
复制
-setParam:name="IIS Web Application Name",value="www.mymainwebsite.co.uk/SubApplication"
票数 9
EN

Stack Overflow用户

发布于 2018-06-09 05:16:39

要将web部署到主站点的子应用程序,请转到TFS,Deploy IIS App步骤,将覆盖参数更新为如下所示

name="IIS Web应用程序名称“,value=”主站点/子应用程序“

它应该会成功的!!

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12301578

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档