Configuration file is not well-formed XML #2

This issue is due to the file 'applicationhost.config' getting corrupted.

The backup of this file is stored at C:\inetpub\history\. Delete the corrupted file C:\Windows\system32\inetsrv\config\applicationhost.config and restore it from the backup. Then start \ restart IIS.

The problem will be resolved.


Follow this, but do not copy the "schema" folder, nor the "Export" folder from the history to the current folder.

http://web.archive.org/web/20130110080607/http://jshidell.com/2012/03/27/fixing-corrupted-applicationhost-config-file-in-iis-7/

More info:

I was able to reproduce this issue!! Modifying the Web.Config incorrectly (see answer to question below) ultimately caused this issue. Because I did all of this stuff, I'm having to restore from a server backup to fix everything since it'll be too difficult to undo everything. Bad Bad Bad Microsoft!

ASP.NET Generic Handler not getting called after .NET 3.5 to .NET 4.0 upgrade

This question is related to:

https://serverfault.com/questions/525443/how-to-uninstall-iis-from-windows-server-2008/525496#525496

Lesson Learned: Before a web server deployment, copy the contents out of this folder before ever changing IIS 7 configuration or making Web.Config changes.

C:\Windows\system32\inetsrv\config\

In my case simply delete the (.vs) folder in the project directory the problem is resolved. (.vs) folder automatically create when building or open project in visual studio.