Thanks for getting in touch, this is a strange one. We've seen it at least once before but have not been able to reproduce it. Our suspicion is multiple threads causing the issue, in version 3.11.18 of Octopus we put in some safe guards to make IIS deployments more reliable. If you can you can try and update to a version after that to see if it solves the problem: https://octopus.com/downloads
Could we get some more details from you to help us work out what's going on. What version of IIS and on which version of Windows is it running on, and which version of Octopus are you currently running.
This is definitely happens in our environment sporadically. Looking at the applicationhost.config file after the failed deploy looks like it contains garbage either from disk or RAM, almost like a memory overflow.
This has been happening to us for over a year now, so I'm not sure if it's something that will be fixed with a new release unless it was specifically addressed.
This causes some major issues when release our websites and we would really like to find a solution to this.
Thanks for getting in touch, sorry to hear you have also been experiencing this issue too. Would you be able to help us narrow down the cause, by providing some information about your set up and installed version.
What is the current version of Octopus you are running that still shows the corruption issue? Does it always happen on the same machine that's being deployed to? What versions of Windows Server/IIS is/are the affected machines?
Are you also making use of the OctopusBypassDeploymentMutex flag for your deployments?