The error message itself is not sufficient to determine the root cause. I would suggest collecting the following diagnostic information first:
Troubleshooting with IIS tools
- Reproduce the same binding change using AppCmd.exe from an elevated command prompt and share the complete error output, especially the HRESULT.
- Check the size and attributes of
applicationHost.configusing PowerShell:Get-Item "$env:windir\System32\inetsrv\config\applicationHost.config" | Format-List Length, Attributes, LastWriteTime - Provide the Windows/IIS version, the existing binding configuration, and the exact changes you are attempting to make (protocol, IP address, port, hostname, SSL flags or certificate).
- Check whether modifying other IIS settings stored in
applicationHost.configalso fails. This helps determine whether the issue is specific to bindings or affects the configuration system generally. - Capture a Process Monitor trace while reproducing the issue. Filter by the entire configuration directory, since the failure might occur during temporary file creation or file replacement.
Troubleshooting with Jexus Manager
You can also use Jexus Manager, which implements its own IIS configuration system rather than relying on Microsoft's native implementation for reading and writing configuration files.
Back up your configuration first, and then attempt the same configuration change using Jexus Manager.
- If Jexus Manager successfully saves the changes but IIS Manager and AppCmd fail, the issue is more likely related to Microsoft's native IIS configuration system or its file-saving mechanism.
- If Jexus Manager also fails, check its logs for more specific .NET exceptions that might reveal the underlying file access or XML processing issue.
Verify the actual changes in applicationHost.config rather than relying solely on the UI.
This comparison can help narrow down the problem significantly.