I’m trying to deploy a .net 3.5 web application.
If I manually deploy the site works just fine. ie. The server has all the correct dependencies installed.
When I try to deploy through Octopus I get the error
There is a duplicate ‘system.web.extensions/scripting/scriptResourceHandler’ section defined
This is an error you get when trying to run a 3.5 site in the 4.0 runtime. I have the config set to the 2.0CLR though so it should be working.
Is there something octopus is doing that uses 4.0 regardless of what CLR I select in the process options?
Could you please confirm which version of Octopus Deploy you’re using? In Octopus v1.6 the Application Pool will only be updated is there is a custom PowerShell script that does so. Octopus itself will never update the Application Pool. In Octopus v2 the feature IIS Websites and Application Pools lets you specify what .NET CLR version the Application Pool will be configured to, and will update existing Pools.
In Octopus v2 remember to create a new release if you change any Steps.
I’m using Octopus 2.0 and the IIS Websites and Application Pools feature is configured to use CLR 2.0. I’m creating a new release with every config change to test.
It appears to me that Octopus 2.0 is using the 4.0 CLR to do the web.config changes even though it deploys and sets up IIS for 2.0.
The error is during the deploy when it’s trying to modify the web.config.
Octopus successfully creates the pool configured with CLR 2.0.
The deploy never succeeds.
None.
Key point. The failure is during the deploy. If I manually deploy the same
package the site runs just fine. This is not a runtime issue in iis. This
is an issue during the Octopus deploy.
Thanks for supplying us with all the extra info.
It’s looking like a bug with how we invoke powershell and the CLR version it uses.
I’ve submitted an issue which you can track here.
To resolve this we will need a copy of a deployment log with this issue, sorry again to ask for further information!