Error: Configuration file is not well-formed XML

This error message occured on the IIS 7 on my SharePoint server this morning (running on win server 2008). How come? Well it all started with this: I was going to add an account on a site, but the AD did not reply, which forced me in to the server to have a look. Turned out that the SharePoint server had 0 KB left on C: drive! No wonder you can’t do anything on the site… Found out that the inetpublogs folder had grown to a whole 16 GB! Log files!! Crazy! Started IIS 7 and looked in the “Logging”:

By default the settings are set to schedule Daily (!) and without limits. It has nothing to do with the usage logging in SharePoint because those files resides in the 12 hive under logs there. And those were “only” 4 GB. Entered a new path from c: drive to the E:drive that has more space, and clicked on “Apply”…. and the IIS crashed. With this message:

Performed an IIS reset, same error message.
Restarted the server, same error message.
Panic! The IIS was dead.

Googled it, and found this article (thanks!!):

So I looked inside the C:Windowssystem32inetservconfigapplicationHost.config folder and the applicationhost.config file size was 0 KB so I renamed that one to old_applicationhost.config and opened the history folder and selected the newest applicationhost.config file. Pasted it to the C:Windowssystem32inetservconfig and performed an IISRESET. Phew…. it’s all back again….

Steps for the future are:

– move all log files to the E drive

– config the IIS log settings and add a limit
Share this blog post:

Leave a Reply

3 Comment threads
0 Thread replies
Most reacted comment
Hottest comment thread
1 Comment authors
BooksChristiano MendesLise Recent comment authors

This site uses Akismet to reduce spam. Learn how your comment data is processed.

newest oldest most voted
Notify of

Cool, thanks for sharing!

Christiano Mendes

I solved this problem in a different/fast way ^^… I opened a command prompt and navigated to the config folder and edited the file with the old-good-friend-DOS-editor: EDIT.EXE. I found some blank spaces in the error line. Just deleted them, saved the file, started the server and… everything running smoothly.


Yes this happened to me as well….I completely freaked out and then found the history folder a few weeks later (it was my dev server.)