The Data is Invalid

I am deploying an IIS site to a server and am getting an error every time the deployment runs and I can’t seem to get past it. The error is:

Set-WebConfigurationProperty : The data is invalid. (Exception from HRESULT: 0x8007000D)
At D:\Program Files\Octopus\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: (:slight_smile: [Set-WebConfigurationProperty], COMException
  • FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.IIs.PowerShell.Provider.SetConfigurationPropertyCommand
    PowerShell script returned a non-zero exit code: 1

Basically, it fails when trying to set security, no matter what I check, it always fails. Any ideas? I have attached the log and the configuration.

log.txt (4 KB)

Hi John,

I believe this happens when there is a problem with your web.config file - perhaps deploying the site manually just this once will help to show the issue? Common causes are depending on a module like IIS URL Rewrite that hasn’t been installed on the target web server, causing the framework to treat your configuration file as being invalid.


That was it, thank you!