Got the following error
Failed: Octopus.Features.IISWebSite_BeforePostDeploy.ps1
Finding SSL certificate with thumbprint 586fca952574f94be13e5472854f72184bebb4b4
Found certificate: SERIALNUMBER=967013056, CN=*.optimera.no, O=OPTIMERA AS, L=OSLO, PostalCode=0976, C=NO
Application pool “authorizationtest.optimera.no” already exists
Set application pool identity: ApplicationPoolIdentity
Set .NET framework version: v4.0
Site “authorizationtest.optimera.no” already exists
Assigning website to application pool…
Home directory: C:\Octopus\Applications\Test-Web\WebSite\1.0.61
Assigning bindings to website…
Binding: https *:443:authorizationtest.optimera.no 586fca952574f94be13e5472854f72184bebb4b4
Anonymous authentication enabled: True
Set-WebConfigurationProperty : Filename: \?\C:\Octopus\Applications\Test-Web\WebSite\1.0.61\web.config
Line number: 34
Error: The configuration section ‘system.serviceModel’ cannot be read because it is missing a section declaration
At C:\Program Files\Octopus Deploy\Tentacle\Scripts\Octopus.Features.IISWebSite_BeforePostDeploy.ps1:132 char:29
Hi.
I have an issue with deploying applications on our servers. Step “IIS Application - Create” is not working properly.
Line written below is generating an error.
Set-WebConfigurationProperty -filter /system.webServer/security/authentication/anonymousAuthentication -name enabled -value “True” -PSPath IIS:\ -location “Default Web Site/Websites/TestApp”
Error message:
The configuration section ‘system.serviceModel’ cannot be read because it is missing a section declaration.
Authentication options could not be set. This can happen when there is a problem with your application’s web.config. For example, you might be using a section that requires an extension that is not installed on this web server (such as URL Rewrtiting). It can also happen when you have selected an authentication option and the appropriate IIS module is not installed (for example, for Windows authentication, you need to enable the Windows Authentication module in IIS/Windows first).
Authentication options could not be set. This can happen when there is a problem with your application's web.config. For example, you might be using a section that requires an extension that is not installed on this web server (such as URL Rewrtiting). It can also happen when you have selected an authentication option and the appropriate IIS module is not installed (for example, for Windows authentication, you need to enable the Windows Authentication module in IIS/Windows first).
Are you by any chance trying to use a specific authentication option, but you don’t have the IIS module installed in your IIS?
Thank you for your prompt reply.
I’ll take a look on monday. However, I’ve found out, that script is not generating any errors on one machine with Powershell 2.0. Seems strange. Although uninstalling specific version of Windows Management Framework is not the best solution, because it requires server to be restarted.