Question

For the past few days I'm trying to deploy my package to IIS 7 but I'm getting nowhere. Whenever I try to publish the package I receive an error saying that the destination folder doesn't exist - but in fact it WAS created on the remote server but was empty (just the folder structure) :/

I'm building my package with a following command:

msbuild.exe /t:CreateWebPackages /toolsversion:4.0 CRM.msbuild

and trying to deploy it with:

CRM.cmd /M:server /Y

Result is:

    C:\...WebService.deploy.cmd /M:crm-web /y
    =========================================================
    SetParameters from:
    "C:...WebService.SetParameters.xml"
    You can change IIS Application Name, Physical path, connectionString
    or other deploy parameters in the above file.
    -------------------------------------------------------
     Start executing msdeploy.exe
    -------------------------------------------------------
     "C:\Program Files\IIS\Microsoft Web Deploy\\msdeploy.exe" 
-source:package='C:...WebService.zip' -dest:auto,computerName='crm-w
    eb-new',includeAcls='False' -verb:sync -disableLink:AppPoolExtension -disableLin
    k:ContentExtension -disableLink:CertificateExtension 
-setParamFile:"C:...WebService.SetParameters.xml"
    Info: Adding sitemanifest (sitemanifest).
    Info: Updating createApp (Kruk CRM Web Service/2.0.65000.65000).
    Info: Adding contentPath (Kruk CRM Web Service/2.0.65000.65000).
    Info: Adding dirPath (Kruk CRM Web Service/2.0.65000.65000).
    Info: Adding child dirPath (Kruk CRM Web Service/2.0.65000.65000\bin).
    Info: Adding setAcl (Kruk CRM Web Service/2.0.65000.65000).
    Error: (2011-10-27 11:07:59) An error occurred when the request was processed on
     the remote computer.
    Error: Could not find file '\\?\C:\inetpub\wwwroot\CRM\2.0.65000.65000'.
    Error count: 1.

But when i edit the SetParameters.xml file and change

<setParameter name="IIS Web Application Name" value="Web Service/2.0.65000.65000" />

to

<setParameter name="IIS Web Application Name" value="Web Service" />

it works! So is there some magic trick that I need to do in order to create new dirs under the site ?

Was it helpful?

Solution

Found it! After experimenting with almost all of the available options of msbuild, msdeploy, project settings, IIS etc, I've noticed that msdeploy couldn't create my application under site's application pool because apparently it's identity had not high enough privileges to do so.

What did the trick was changing the identity of the site pool to Local System.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top