What is expected for DeployIisAppPath setting on MSBuild argument?
Asked Answered
C

1

9
SERVERNAME(myDomain\Username)
   Application Pools
   Sites
      DEV Site1
      DEV Site2
      dev Site 3
         bin
         Content
         ...
         Views
      etc ...

This is my basic layout of our DEV web server. Our DEV web server has many sites running on it. I am trying to use TFS 2013 Build to publish my web site to the DEV server following articles from Vishal Joshi, Microsoft and others.

My error is "ERROR_SITE_DOES_NOT_EXIST". The basic fix does not help me.

In my example, I'm using /p:DeployIisAppPath="dev Site 3". There are no applications defined under the site.

Microsoft's instructions are useless. I thought I should just use the IIS site name, but that is not proving successful. What is the value expected for this parameter? Do I someone need the App Pool name? Is there a command I can issue against IIS to export the list of all the AppPaths available? Once I figure this out on the DEV server, I have to do the same with the STG server.

[UPDATE 1] Adding the full MSBuild arguments

/p:DeployOnBuild=True 
/p:DeployTarget=MsDeployPublish 
/p:CreatePackageOnPublish=True 
/p:MSDeployPublishMethod=InProc 
/p:MSDeployServiceUrl=http://SERVER:PORT/MsDeployAgentService
/p:DeployIisAppPath="dev Site 3"
Cata answered 6/3, 2014 at 18:58 Comment(3)
Are you using MSDeployPublish (e.g. /p:DeployTarget=MsDeployPublish)?Marci
Also, are you specifying the site location in the service url also? For example '/p:MsDeployServiceUrl="SERVER:8172/MsDeploy.axd?Site=direct"'Marci
Thanks @CodeWarrior, I updated my question. I should have included the full context.Cata
M
10

Your server is inside your domain, so I will use the solution that I have for our inside server. I had to come up with something different for our DMZed servers.

MSBuild arguments

/p:DeployOnBuild=True 
/p:DeployTarget=MsDeployPublish 
/p:CreatePackageOnPublish=False 
/p:MSDeployPublishMethod=WMSvc 
/p:MsDeployServiceUrl="https://SERVER:8172/MsDeploy.axd?Site=direct" 
/p:DeployIisAppPath="direct" 
/p:AllowUntrustedCertificate=True 
/p:AuthType=NTLM 
/p:UserName=

This solution uses WMSvc (installed on the webserver) to allow the TFS build process to access the portions of the server that it needs to when deploying. I havent tried MSDeployAgentService, so i am unsure about that one. In my case, I do not create a package on deploy ( I seem to recall it returned an error when I did that, although I don't remember what it was).

Also, last three arguments are necessary to for the TFS Build Service account to log into VMSvc and do its thing. Leaving UserName blank causes it to log in as the running account (no need to supply a password, yay!).

Build log

Here is an example output from the build log on a successful deployment.

   MSDeployPublish:
     Start Web Deploy Publish the Application/package to https://SERVER:8172/MsDeploy.axd?Site=direct ...
     Starting Web deployment task from source: manifest(C:\Builds\1\Direct\Continuous Integration (SERVER)\Binaries\_PublishedWebsites\WEBPROJECTNAME_Package\Archive.SourceManifest.xml) to Destination: auto().
     Adding ACL's for path (direct)
     Adding ACL's for path (direct)
     Updating file (direct\bin\Content\images\buttonBkgHover.png).
          ... Removed for brevity => This section is all 'Updating file (PATH).'
     Updating file (direct\Web.config).
     Adding ACL's for path (direct)
     Adding ACL's for path (direct)
     Successfully executed Web deployment task.
     Publish is successfully deployed.
   PipelineDeployPhase:
     Publish Pipeline Deploy Phase
Marci answered 6/3, 2014 at 20:51 Comment(6)
Do you have spaces in any of your site names? Your example is "direct" so I'm assuming that is the site's name and repeated in 2 parameters. If there is a space, I'd assuming you'd use %20 in the site querystring value.Cata
In the URL I would expect a %20. In the DeployIisAppPath I would just expect a space since it is in Quotes.Marci
could you be so kind as to show me the log statements in a Build telling you that the MSDeploy was successful? My build is not failing, but I'm not seeing the server code change. I don't know what to look for in the MSBuild log to know that the MSDeploy was called and was working.Cata
Alrighty. Added. There are about 1500 lines missing in the middle where it was updating files on the server, one line for each. I left the first and last such lines.Marci
OH! very helpful. So am NOT working because I see none of this in my logs.Cata
Hmm. Keep in mind these lines are from Diagnostic level output. Be sure you are running that.Marci

© 2022 - 2024 — McMap. All rights reserved.