When trying to install a new web client instance of Business Central 19.1 on Windows Server 2022 I ran into this error:
Set-WebConfigurationProperty : The data is invalid. (Exception from HRESULT: 0x8007000D)
At C:\Program Files\Microsoft Dynamics 365 Business Central\xxxxxx\Service\NAVWebClientManagement.psm1:654 char:5
- Set-WebConfigurationProperty -Filter ‘/system.webServer/security/ …
~~~~~~~~~~~~~- CategoryInfo : NotSpecified: (:) [Set-WebConfigurationProperty], COMException
- FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.IIs.PowerShell.Provider.SetConfigurationPropertyCommand
Set-WebConfigurationProperty : The data is invalid. (Exception from HRESULT: 0x8007000D)
At C:\Program Files\Microsoft Dynamics 365 Business Central\xxxxxx\Service\NAVWebClientManagement.psm1:655 char:5
- Set-WebConfigurationProperty -Filter ‘/system.webServer/security/ …
~~~~~~~~~~~~~- CategoryInfo : NotSpecified: (:) [Set-WebConfigurationProperty], COMException
- FullyQualifiedErrorId : System.Runtime.InteropServices.COMException,Microsoft.IIs.PowerShell.Provider.SetConfigurationPropertyCommand
The error was solved by downloading and installing the latest version of .Net Runtime from https://dotnet.microsoft.com/download/dotnet/5.0/runtime (Choose “Download Hosting Bundle”). In my case the latest version was 5.0.11. After installing this version the problem was gone.