unable to save applicationHost.config file

2019-06-14 23:32发布

问题:

I could not save applicationHost.config file, it says "save failed and it is open in another programs" while I stop IIS service and closed visual studio, any idea?

回答1:

If you're on a 64-bit architecture and trying to edit with a 32-bit editor (e.g. Notepad++) apparently you can't save the file. Try editing your file with the regular notepad that is shipped with Windows. To be absolutely sure, also run Notepad as an Administrator



回答2:

You do not have sufficient priviledge to modify the file.

Right click on file and click Properties.

Under the Security tab -> check to see if the user account you are logged in with has Modify permission on the file.

If not then Edit the permission and check the modify and Apply these settings.

Now try updating it.



回答3:

  1. Open Notepad++ as admin
  2. Open %SystemRoot%\Sysnative\inetsrv\config\applicationHost.config
  3. Stop IIS
  4. Edit and save changes


回答4:

Are you trying to edit the one in C:\Program Files\IIS Express\AppServer? There's a mirror copy in your Documents folder, under IISExpress\config which I believe is the one you're meant to edit; changes are copied across for you.