如何使用 IIS 6 Web Deploy 部署到非默认虚拟路径?
我使用 IIS6、Web 部署代理服务和 MSBuild 的 MSDeploy 挂钩进行部署。它现在使用这组参数部署到 MSBuild:
/p:DeployOnBuild=True
/p:DeployTarget=MsDeployPublish
/p:MSDeployServiceURL=example.com
/p:DeployIISAppPath=example.com/DeploySiteName
/p:CreatePackageOnPublish=True
/p:MsDeployPublishMethod=RemoteAgent
/p:AllowUntrustedCertificated=True
/p:UserName=login
/p:Password=pw
这样,它将部署到网站文件所在的 C:\Inetpub\wwwroot\wss\VirtualDirectories\example.com80
。
不幸的是,我需要将其部署到 D:\Webs,主要是出于空间原因。
我试图找出哪个交换机(如果有的话)将允许我部署到备用物理路径并映射虚拟目录。
我尝试了逆向工程 C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets
就像另一篇 SO 帖子建议的那样,但我失败了。 ..我尝试使用这些参数的组合,但它们没有明显的效果:
/p:DeployIisAppPhysicalPath=D:\Webs
/p:RemoteSitePhysicalPath=D:\Webs
有什么建议吗?
I'm using IIS6, Web Deploy Agent Service, and MSBuild's MSDeploy hooks to deploy. It deploys right now with this set of arguments to MSBuild:
/p:DeployOnBuild=True
/p:DeployTarget=MsDeployPublish
/p:MSDeployServiceURL=example.com
/p:DeployIISAppPath=example.com/DeploySiteName
/p:CreatePackageOnPublish=True
/p:MsDeployPublishMethod=RemoteAgent
/p:AllowUntrustedCertificated=True
/p:UserName=login
/p:Password=pw
With that, it will deploy to C:\Inetpub\wwwroot\wss\VirtualDirectories\example.com80
, where the Website files are located.
Unfortunately, I need it to deploy to D:\Webs
, mostly for space reasons.
I'm trying to figure out what switch, if any, will allow me to deploy to an alternate physical path and map the virtual directory.
I tried reverse-engineering C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\Web\Microsoft.Web.Publishing.targets
like another SO post suggested, but I failed... I tried using combinations of these parameters and they had no visible effect:
/p:DeployIisAppPhysicalPath=D:\Webs
/p:RemoteSitePhysicalPath=D:\Webs
Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您在 IIS6 中创建一个虚拟文件夹以指向不同的物理位置,然后传入上面列出的路径和参数,MSDeploy 将写入正确的物理位置。
If you create a virtual folder in IIS6 to point to a different physical location to start with, then pass in the path and parameters like you listed above MSDeploy will write to the correct physical location.