Wednesday, December 9, 2009

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 inetpub\logs 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!!):
http://www.tekniken.nu/drift_och_underhall/forefront_saboterar_iis_7

So I looked inside the C:\Windows\system32\inetserv\config\applicationHost.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:\Windows\system32\inetserv\config\ 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

3 comments:

Books said...

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.)

Christiano Mendes said...

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.

Lise said...

Cool, thanks for sharing!
/Lise