Author: Craig Floyd
Issue: When IIS Server is reporting the applicationHost.config file is missing or corrupted
.
Resolution:
Locate IIS History Backups
IIS automatically stores previous versions of applicationHost.config in the history directory.
Navigate to: C:\inetpub\history\
- Open File Explorer
- Browse into C:\inetpub\history
- You will see folders named CFGHISTORY_000000xxxx
- Open the most recent folder (highest number)
Identify a Valid applicationHost.config
You need to confirm the backup file is intact before restoring it.
- Inside the history folder, locate applicationHost.config
- Ensure the file is not 0 bytes
- Right‑click → Open with Notepad to verify it contains XML
Stop IIS Before Restoring
Stopping IIS prevents it from rewriting or locking the config during restoration.
Run: iisreset /stop
- Open Command Prompt as Administrator
- Type iisreset /stop
- Wait for confirmation that IIS services have stopped
Copy the Backup File to the IIS Config Directory
Replace the corrupted or missing config with the known-good backup.
Destination: C:\Windows\System32\inetsrv\config\
- Copy the backup applicationHost.config
- Paste it into C:\Windows\System32\inetsrv\config
- Approve overwrite when prompted
- Ensure file size matches the backup (not 0 bytes)
Restart IIS Services
Once the restored file is in place, IIS can load the configuration normally.
Run: iisreset /start
- Return to the Administrator Command Prompt
- Type iisreset /start
- Wait for confirmation that IIS services have started
Verify Sites and Application Pools
Confirm IIS is functioning correctly after the restore.
- Open IIS Manager
- Check that Application Pools are started
- Confirm your Sites load without configuration errors