Errors with site deployment

I’ve been getting fairly consistent errors when deploying a web site using 2.0. The deployment does use the new “create website/app pool” architecture.

I’ve fixed it locally in each tentacle “octopus.features.IISWebSite_BeforePostDeploy.ps1” but you all need to fix it too.

Basically, when the tentacle is getting the apppoolstate (Get-WebAppPoolState $ApplicationPoolName) the pool isn’t available yet and the command fails with: "The object identifier does not represent a valid object."
It basically needs sleep for a second before it get’s the app pool state. like:
start-sleep -s 1

Thanks -

Great information to have, thanks very much for letting us know. I’ve recorded an issue to track this here: https://github.com/OctopusDeploy/Issues/issues/490

Regards,
Nick

Here is another error when attempting to start the app pool

start-webitem : Cannot create a file when that file already exists. (Exception HRESULT: 0x800700B7)

And “start-sleep -s 1” isn’t quite long enough…

My fault on previous comment… Binding mismatch.