I have configured (our first) deploy of a IIS web application today. However I get the following error message: A parameter cannot be found that matches parameter name ‘physicalPath’.
I have configured the physical path to the same as the custom installation directory.
We are using Octopus Server version 3.8.1
It failes on the Octopus.Features.IISWebSite_BeforePostDeploy.ps1:297 char:78
Thanks for reaching out! Could you please follow the below steps and send us a full deployment log? That should help us get to the bottom of this.
1) Add these 2 variables to your project http://docs.octopusdeploy.com/display/OD/Debug+problems+with+Octopus+variables
2) Create a new release (so the new variables take effect) and deploy it. If possible skip as many steps as you can and only leave step we are troubleshooting in order to avoid the noise in the log.
3) Send us the raw log of that deployment http://docs.octopusdeploy.com/display/OD/Get+the+raw+output+from+a+task
Here is the file you requested.
Thanks for sending over that info. Could you please use the Script Console to run the below code on the same Tentacle where your deployment is failing, and then send me the raw log of that task?
Import-Module WebAdministration -Verbose
$IISCommands = Get-Command -Module WebAdministration
Write-Output "Found [$($IISCommands.count)] cmdlets for the module WebAdministration"
Here comes the script task file.
I ran this one through our dev team and this is the conclusion we reached to:
The code line that’s failing looks like this
New-Item $fullPathToLastVirtualPathSegment -type Application -physicalPath $physicalPath
The error says that the Parameter
-PhysicalPath does not exist for the cmdlet
New-Item. By default, that parameter is not available for
New-Item. The way to make it show up is if:
- IIS is in the machine.
WebAdministration module has been loaded, which seems to be the case given the output of the last script I made you run.
- The path passed to the
-Path parameter points to the IIS drive (
IIS:\xyz), which is the case.
We believe at least one of the 3 above is somehow off, most likely the first one. This is most likely an environment thing on that VM, so the best way to test this would be to Setup a Tentacle on another vanilla VM with IIS freshly installed. Do you think you could make that sort of test?
you were right. Deploying to an another (newer) IIS did the trick.
Glad to hear that.
If your server is Cattle and not a Pet, I’d recommend you to re-provision it. If that’s not the case, then you’re gonna have to check whats different in IIS between those 2 machines.