Getting Error: The configuration section ‘uri’ cannot be read because it is missing a section declaration - which usually means that you have v4 Asp.NET (and config) but you are using V2 to read the web configuration. I have everything I can think of set up to use V4 though. The application pool default in IIS is v4. The application pool step config in Octopus is v4. What am I missing?
I verified that v3.5 is installed on the server (a problem that others had run into with the same error) and made sure ASPV4 was registered using aspnet_regiis -cur. I tried adding the URI config section declaration to the web.config and that (of course) got past the error, but then the site itself fails complaining of invalid configuration with two URI sections declarations. I took a look at the machine.config for v2 and v4 and they look ok (URI section declaration not in v2, but in v4 as expected).
Unfortunately, the URI section is required by OAuth, so I can’t just yank it.
Here’s the stack:
Set-WebConfigurationProperty : Filename: \?\C:\Octopus\Applications\Acceptance\PrimarySite\0.9.140420.7_1\lib\PrimarySite\web.config
Line number: 450
Error: The configuration section ‘uri’ cannot be read because it is missing a section declaration
At C:\Octopus\Applications.Tentacle\Octopus.Tentacle\2.3.6.1385\Scripts\Octopus.Features.IISWebSite_BeforePostDeploy.ps1:132 char:29
- Set-WebConfigurationProperty <<<< -filter /system.webServer/security/authentication/anonymousAuthentication -name enabled -value “$enableAnonymous” -location $WebSiteName -PSPath “IIS:”
- CategoryInfo : NotSpecified: ( [Set-WebConfigurationProperty]
, COMException - FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.IIs.PowerShell.Provider.SetConfigurationPropertyCommand
Fatal 20:25:26
PowerShell script returned a non-zero exit code: 1
- CategoryInfo : NotSpecified: ( [Set-WebConfigurationProperty]