Home > SharePoint Problems/Issues > Fixing Corrupted applicationHost.config file in IIS 7

Fixing Corrupted applicationHost.config file in IIS 7

Recently one of my SharePoint WFE’s servers applicationHost.config files became corrupted on the server.  Not sure how it happened or what caused it.  Might have been when I was trying to re-provision the User Profile Service Application.  Anyways IIS7 was erroring out with the error below when I tried to access the websites and application pools.  So all websites and web applications were unavailable.

The Windows Process Activation Service encountered an error trying to read configuration data from file ‘\\?\C:\Windows\system32\inetsrv\config\applicationHost.config’, line number ’1′. The error message is: ‘Configuration file is not well-formed XML’

When browsing to: C:\Windows\system32\inetsrv\config\applicationHost.config I noticed that the applicationHost.config files size was 0kb.  What?!  After opening up the file I noticed it was wiped clean.  Something went terribly wrong.  Luckily IIS7 automatically keeps the history of the applicationHost.config file every time there is a change in IIS7.

To access the history of the applicationHost.config file.

1.  Browse to C:\inetpub\history directory
2.  Inside this directory you will find the history of all the applicationHost.config file.
3.  Pick a applicationHost.config file that you know is not corrupted.  I usually pick one a few hours back to be safe.
4.  Copy the applicationHost.config file and paste it into the C:\Windows\system32\inetsrv\config directory, replacing the corrupted file.
5.  Now attempt to access IIS7 again.  This time IIS7 should open, and you should be able to access all your sites and web apps.

Thanks IIS7 for your history directory.

  1. November 27, 2012 at 1:16 pm

    Thank you so much!!!

    Thought I was going to spend all afternoon fixing this, but this has saved me.

  2. zz
    February 5, 2013 at 12:55 am

    thank you very much!

  3. September 20, 2013 at 6:56 pm

    thank you very much ,it solved my issue

  4. Mike Steklac
    October 8, 2013 at 4:03 pm

    Thanks for the informative post. Any ideas how the file was blanked out?

  5. David
    October 8, 2013 at 8:50 pm

    Amen to the other posts! Thank you!

  6. Jake
    November 13, 2013 at 8:12 pm

    Thank You!! …Helped fix my exchange.

  7. Max
    December 11, 2013 at 8:56 am

    Thanks, was helpful, Sharepoint 2013 Farm Account Change caused this

  8. Hek
    April 9, 2014 at 5:41 am

    Thank you so much 😀

  9. September 22, 2014 at 11:02 pm

    An outstanding share! I’ve just forwaarded this onto a co-worker who had been doing
    a little research on this. And he actually bought me lunch because
    I discovered iit for him… lol. So allow me to reword this….
    Thanks for the meal!! But yeah, thanx for spending some time to
    talk about this toplic here on your website.

  10. Bonnie
    October 31, 2014 at 2:22 pm

    Thank you so much!!!! I was in an panic waiting for MS to call me back to fix this 🙂 Huge save, thanks!

  11. Klaus
    November 4, 2014 at 7:25 pm

    Super! Thank you for your help. I fixed my problem

  12. Llyd
    January 15, 2015 at 9:37 am

    I’ve got a problem with my Exchange 2007 system, which is refer to the applicationHost.config file, that it cannot find SITE_3 after an update. In the IIS, there is a not working SITE_3 site. When I did what you wrote, the IIS got fixed, but in the exchnage, I still get the same error, even there is no SITE_3 written in this config file. Have anyone seen this before?

    • January 15, 2015 at 11:35 am

      Hi Lyld,

      Is the SITE_3 showing up in IIS? Is the SITE_3 needed?



  13. Llyd
    January 23, 2015 at 1:33 pm


    It showed up until I did not replaced the corrupted apllicationhost.config file. After that, it’s not showing up in IIS, only in Exchange. It is not needed, it showed up first after the update of the server years ago. I’ve got this server from another it admin…

  14. Khaled
    March 10, 2015 at 7:17 am

    dude you’re a life saver, thanks man.

  15. mcarterlh
    June 19, 2015 at 12:21 pm

    Thank you, this is as @Khaled said, a life saver! Worked as described! Thank you!

  16. August 25, 2015 at 7:54 pm

    Thank you. God Bless you. You just saved me so much time.

  17. etechtech
    August 25, 2015 at 7:55 pm

    Thank you, you really saved me a huge headache and a lot of time. God Bless You.

  18. ayoub
    November 12, 2016 at 7:10 pm

    Thank you so much

  19. Yaku
    May 2, 2017 at 7:06 am

    It was perfect solution, Thank you so much.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: