Skip to Content

How to Fix IIS Services Startup Failure and Root Element Missing in Exchange 2016

Resolve the frustrating IIS services failure on Exchange 2016 with our step-by-step guide. Don’t let the “root element is missing” error disrupt your server operations.

Exchange Server 2016 and Windows Server 2016 users may encounter an issue where IIS services refuse to start, displaying the error message: “root element is missing.” This article will guide you through resolving this issue and restoring IIS functionality.

Problem Description

The issue arises in an environment with Windows Server 2016 and Exchange Server 2016. The IIS services refuse to start during boot, manual start, or with iisreset. When opening IIS and viewing application pools, the following error message is displayed:

"There was an error while performing this operation.
Details:
Filename: C:\Windows\system32\inetsrv\config\applicationhost.config
line number: 0
Error: root element is missing"

How to Fix IIS Services Startup Failure and Root Element Missing in Exchange 2016

Solution 1: Checking the Configuration File

The first step in resolving this issue is to check the ApplicationHost.config file for any errors or inconsistencies. Follow these steps:

  1. Open the ApplicationHost.config file in a text editor, such as Notepad.
  2. Check for any syntax errors or missing elements in the file.
  3. Ensure that the file is properly formatted, with all elements properly nested and closed.
  4. If you find any errors, correct them and save the file.
  5. Attempt to start the IIS services again.

Solution 2: Restore applicationhost.config file from recent backup

The error message indicates that the root element is missing in the applicationhost.config file. This file is crucial for the operation of IIS services. The solution involves restoring this file from a backup or a healthy server with a similar configuration.

  1. Navigate to C:\Windows\system32\inetsrv\config\.
  2. Rename the current applicationhost.config to applicationhost.config.old.
  3. Copy the applicationhost.config file from a backup or a healthy server with a similar configuration.
  4. Paste the copied file into C:\Windows\system32\inetsrv\config\.
  5. Restart the World Wide Web Publishing Service (WAS) using the following command in an elevated Command Prompt:
    net stop WAS && net start WAS

    Alternatively, restart the IIS services.

By following these steps, the IIS services should start as expected.

Solution 3: Reset IIS Configuration

If the previous solution does not work, you can try resetting the IIS configuration to its default state. This will reset all IIS settings to their default values and removes all custom websites, application pools, and settings, which may resolve any issues caused by misconfigured settings. Follow these steps:

  1. Open an elevated Command Prompt.
  2. Execute the following command:
    %windir%\system32\inetsrv\iisreset.cmd /reset
  3. Wait for the reset process to complete.
  4. Attempt to start the IIS services again.

Note: This will restart IIS services with a default configuration. You’ll need to manually recreate your websites and application pools.

Solution 4: Reinstall IIS

To fix the IIS services failure and the “root element is missing” error, follow these steps:

  1. Before making changes, back up the original applicationhost.config file located at C:\Windows\System32\inetsrv\config.
  2. Delete the corrupted applicationhost.config file.
  3. Open the Command Prompt as an administrator and run the following command to reinstall IIS:
    dism /online /enable-feature /featurename:IIS-WebServerRole /all
  4. Restart the server to apply changes.

After completing these steps, IIS services should start correctly, and the “root element is missing” error should be resolved.

Solution 5: Checking for Conflicting Applications

Sometimes, conflicting applications can interfere with IIS services, preventing them from starting. Follow these steps to check for conflicting applications:

  1. Open the Task Manager.
  2. Check for any suspicious or unknown applications running in the background.
  3. If you find any suspicious applications, close them and attempt to start the IIS services again.

Solution 6: Checking for Corrupted Files

Corrupted files can also cause issues with IIS services. Follow these steps to check for corrupted files:

  1. Run a system file checker (SFC) scan by running the following command in the Command Prompt:
    sfc /scannow
  2. If the SFC scan detects any corrupted files, follow the prompts to repair them.
  3. Attempt to start the IIS services again.

Preventing Future Corruption

Here are some tips to minimize the risk of future applicationhost.config corruption:

  • Regularly back up your applicationhost.config file.
  • Avoid directly editing the file unless absolutely necessary. Utilize IIS Manager for configuration changes.
  • Install updates for Windows Server and Exchange Server promptly.

Conclusion

Encountering IIS services failure on Exchange 2016 with the “root element is missing” error can be disruptive. By following this guide, you can quickly resolve the issue and restore IIS functionality to your server.