0

I have 2 .net Web projects Project 1 and Project 2. I am using MSDeploy to deploy both the projects on the IIS using command line (script). I want to create structure like below while deployment to IIS

On IIS

  • Default Web site\MySite\Project 1
  • Default Web site\MySite\Project 2

Project 1 contains 10 folders inside it for example folder 1 , folder 2, ....,folder 10 I want convert folder 6 as the virtual directory having different physical path (pointing to Project 2) contents.

I am using below MSDeploy command

msdeploy.exe -verb:sync -source:iisApp='D:\Deployment\UI',includeAcls=true -dest:iisApp='Default Web site\MySite\Project 1',computerName="http://xx.xx.xx.xxx:80/MSDeployAgentService",username=xxx,password=xxx

Using the same MSdeploy command for Project 1 and project 2 both. How can I achieve above requirements.

binki
  • 7,754
  • 5
  • 64
  • 110
Vimal Patel
  • 119
  • 1
  • 1
  • 4

1 Answers1

0

You can use the createApp provider to convert a folder to an app. Regarding the physical path change, your best option is to use the runCommand provider to call appCmd to edit the physical path for the site/app.

http://www.dotnetcatch.com/2016/06/28/webdeploymsdeploy-quick-tip-change-iis-siteapp-physical-path-with-msdeploy/

chief7
  • 14,263
  • 14
  • 47
  • 80
  • I am running a script which will deploy the application on remote IIS (using msdeploy). if I run appcmd using rumcommand, I do not see any way where I can tell appcmd to execute the command on same remote IIS. Default appcmd will run on local machine which is we do not want – Vimal Patel Jun 29 '16 at 04:04
  • When run via the runCommand provider it will be run on the target server. – chief7 Jun 29 '16 at 12:44