Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I use IIS 6 Web Deploy to deploy to a non-default virtual path?

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?

like image 571
Scott Stafford Avatar asked Dec 16 '25 16:12

Scott Stafford


1 Answers

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.

like image 162
Paul Lemke Avatar answered Dec 19 '25 07:12

Paul Lemke



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!