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? Details: Filename: \\?\C:\Windows\system32\inetsrv\config\applicationHost.config 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.
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!
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 file...it 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.
More details here: http://blogs.iis.net/wonyoo/shared-configuration-and-password-expiration
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.