Configuration file is not well-formed XML #2

I'm trying to fix an IIS 7 web server on Windows Server 2008. I don't know what caused this configuration to go bad. Any ideas on where to begin to look?

Error when clicking on the server node in the object explorer of IIS Manager.

There was an error when trying to connect.  Do you want to retype your credentials and try again?



Line number: 1
Error: Configuration file is not well-formed XML


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.

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:

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.


This just happened to a server I help admin. We're troubleshooting but we definitely did NOT recently change anything in IIS that would modify the config just became empty (0 bytes). Now investigating whether recent patching could've caused it.

Had a similar problem that was due to the user password recently changing after having imported configuration.

There was an error when trying to connect. Do you want to retype your credentials and try again? Filename: C:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG\machine.config

The solution was to change enabled from true to false in the redirection.config file in C:\Windows\System32\inetsrv\config.

<configurationRedirection enabled="false" 

More details here:

simply delete the file applicationHost.config from that location and reload the project. it will automatically create new applicationHost.config file while reloading the project.

I changed the file from my backup previous version then works perfectly.

Need Your Help

jQuery AJAX producing 304 responses when it shouldn't

jquery ajax http-status-code-304

This really has me scratching my head. Namely because it only happens in IE, not Firefox, and I was under the impression that jQuery was effectively browser neutral. I've been cracking at this thin...

Lombok annotation @Getter for boolean field

java lombok

I am using Java lombok annotation @Getter to generate getters for my POJO. I have a 'boolean' field by the name 'isAbc'. The @Getter annotation in this case generates a method by the name 'isAbc()'.