I have set the Application Pool Identity to Local System, created a new release and deployed the new release to and existing environment that already had the previous release. I manually set the application pool to Local System there with no problem.
However, when I deployed from octopus it went back to ApplicationPoolIdentity.
In the Task Log, Octopus records "Set application pool identity: ApplicationPoolIdentity"
and that is confirmed on the deployment target.
Check your deploy steps one of them probably has the apppool identity set to "ApplicationPoolIdentity’ its usually the Deploy to IIS step that will have it.
There is nowhere else that has it set to application pool identity.
I can also be sure of that, since in the same place that I am setting Local
System, if I choose Custom User, it does work.