IIS bindings - remove and add

I believe there is a flaw with how the bindings are processed (Octopus.Features.IISWebSite_BeforePostDeploy)

First all the bindings are removed.
Clear-ItemProperty $sitePath -name bindings

Then bindings from the config are added one by one.
New-ItemProperty $sitePath -name bindings -value ($wsbindings[$i])

Between the first line and the iterator for adding the bindings configured on the step, the website has no bindings at all? Sure it only takes a few millieseconds until bindings are all added again, but still, any incoming request for one of those hostnames will fail.

Also I think removing all bindings and only adding those from the config should be an option. But that’s for another discussion.

Hi David,

Thanks for getting in touch and sorry for the delay. We’ve discussed this and decided to create a github issue to improve this process. This is the link in case you want to follow its progress.

Thanks

Dalmiro

Awesome.
Thanks.