Why did IIS ApplicationHost.config file disappear?

용진 임 20 Reputation points
2025-03-11T23:47:58.1466667+00:00

Hello,

Currently, I am operating two cloud-based instances of Windows Server 2012 and 2016.

In IIS, when I try to add a binding or modify the application pool, the changes are not saved, and I encounter the following error:

C:/Windows/system32/inetsrv/config/applicationHost.config

Error: Cannot write to the configuration file.

When I navigate to the specified path, the applicationHost.config file does not exist.

In the case of Windows Server 2012, it seems that the file was removed after an update.

Additionally, for the Windows Server 2016 instance, there are no backup files available in C:\inetpub\history.

Would anyone be able to provide insights into the possible cause of this issue or suggest a solution?

Thank you in advance for your help.

Windows for business Windows Server User experience Other
0 comments No comments
{count} votes

Accepted answer
  1. Anonymous
    2025-03-13T01:28:12.6333333+00:00

    Hello 용진 임,

    Thank you for posting in Q&A forum.

    Here are a few steps you can take to resolve this problem:

    1. Ensure that the IIS user account has the necessary permissions to write to the applicationHost.config file. You can do this by checking the file and folder permissions in the C:/Windows/system32/inetsrv/config directory.
    2. If the file is missing, you can try recreating it. You can copy the applicationHost.config file from a similar server setup or create a new one using the default configuration settings.
    3. If you have a backup of the applicationHost.config file, restore it to the C:/Windows/system32/inetsrv/config directory. If there are no backups available in C:\inetpub\history, you might need to manually recreate the necessary configurations.
    4. Try resetting IIS by running the following command in an elevated Command Prompt: iisreset This can sometimes resolve issues with configuration changes not being saved.
    5. Check the Event Viewer logs for any errors or warnings related to IIS or the applicationHost.config file. This can provide more insights into the root cause of the issue.

    I hope the information above is helpful.

    If you have any questions or concerns, please feel free to let us know.

    Best Regards,

    Daisy Zhou

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.


1 additional answer

Sort by: Most helpful
  1. 용진 임 20 Reputation points
    2025-03-20T06:45:24.4033333+00:00

    Thank you for your answer.

    I would like to ask you something additional, so I would like to ask you an additional question.

    1. I wonder if the applicationHost.config file does not change when it comes to adding and operating functions to the server. Other servers have backed up files, so I want to know if I can use them as they are.
    2. I'd like to know if what you told me in answer 4 is a valid command without the applicationHost.config file itself.

    Please understand that I cannot try this or that because it is a problem that is occurring on the customer's operating server.

    1. If you could not find a log for the deletion of the applicationHost.config file in IIS, please let me know if you have any guesses
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.