Hello,
I have a problem when using the “IIS Deploy” step template with the “IIS Virtual Directory” deployment type.
My use case is to deploy a package in the “default” virtual directory of an existing website.
I don’t want to use custom directories or a named virtual directory.
In the step configuration, I declare a parent website name equals to “Backoffice” and a virtual path equals to “/”.
My applicationHost.config looks like this :
<site name="Backoffice" id="8" serverAutoStart="true">
<application path="/" applicationPool="Backoffice">
<virtualDirectory path="/" physicalPath=C:\Octopus\Applications\Local Dev\Backoffice\15.0.6399_6" />
</application>
<bindings>
<binding protocol="https" bindingInformation="*:443:devtest.backoffice.com" sslFlags="1" />
</bindings>
</site>
The deployment fails with this kind of logs :
Making sure a Virtual Directory "/" is configured as a child of "Backoffice" at "C:\Octopus\Applications\Local Dev\Backoffice\15.0.6399_7"...
"/" already exists in IIS and points to an unknown item which seems to be a directory. We will try to convert it to a Virtual Directory. If you used the Custom Installation Directory feature to target this path we recommend removing the Custom Installation Directory feature, instead allowing Octopus to unpack the files into the default location and update the Physical Path of the Virtual Directory on your behalf.
Attempt 1 of 5 failed: Le noeud parent ne possède pas d'enfants de type VirtualDirectory.
Error : New-Item : Le noeud parent ne possède pas d'enfants de type VirtualDirectory.
Error : Nom du paramètre : path
Error : Au caractère C:\Octopus\Applications\Local
Error Dev\Backoffice\15.0.6399_7\Octopus.Features.IISWebSite_BeforePostDeploy.ps1:316 : 5
Error : + ... New-Item $fullPathToLastVirtualPathSegment -type VirtualD ...
Error : + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error : + CategoryInfo : InvalidArgument : (:) [New-Item], ArgumentException
Error : + FullyQualifiedErrorId : Le noeud parent ne possède pas d'enfants de type VirtualDirectory.
Error : Nom du paramètre : path,Microsoft.PowerShell.Commands.NewItemCommand