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!!):

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