Sunday, January 17, 2010

Configuration file is not well-formed XML-ApplicationHost.config

This is totally IIS configuration related issue as applicationHost.config marked as corrupted. You may get this error due to various reasons unmanaged restoration, erroneous editing of applicationHost.config, etc. Here I am going to show you quick recovery method without going any deep. Technically we are going to restore the applicationHost.config file form IIS generated backups by using AppCmd.exe command line tool.

Go to the Command Prompt.

Change the path to > %windir%\system32\inetsrv\

Find the current backup list > %windir%\system32\inetsrv\appcmd.exe list backup

Select the latest backup by sequence number
Restore the backup > %windir%\system32\inetsrv\appcmd.exe restore backup