11

Everytime I try to add / update settings through the IIS 7 Manager I get the following error.

enter image description here

I'm running Windows 7 Ultimate (32-bit). I'm using a LocalSystem AppPoolIdentity

chobo
  • 31,561
  • 38
  • 123
  • 191
  • Did you find a solution to this error? – Roberto Bonini Sep 02 '14 at 09:57
  • @chobo We have exactly [this issue](https://danielsmon.com/2017/04/03/cant-write-to-applicationhost-config/), same error message as above. We've resorted to disabling EFS on certain config files to get around it but that doesn't solve the core issue: on most of our servers editing a EFS "web.config" file though IIS works fine (assuming you have the right user account setup in the App pool), but on one specific server it does not, would love to know the reason why. – David Rogers Apr 27 '20 at 20:07

5 Answers5

4

Check if web.config has read only permissions checked.

DotNetUser
  • 6,494
  • 1
  • 25
  • 27
2

Make sure the web.config's Read-only FILE attribute is not checked:

web.config file properties

CharlieG
  • 489
  • 1
  • 4
  • 11
2

This error can also happen if the hard drive has run out of space - i.e. there isn't enough space to write the to the config file.

Obviously this would have to be a very full drive, but I've seen this happen on servers where the log files are written to the C drive (and evetually fill it right up)

Kaine
  • 1,285
  • 2
  • 16
  • 30
0

Try the following:

  1. Copy web.config file from original to alternate location, e.g., Desktop
  2. Edit and save in alternate location
  3. Copy back to original location

I do not understand why this works, but it did for me and apparently several other users.

David
  • 1,074
  • 11
  • 12
0

Make sure that the location of your webconfig file has the correct security permissions set. Normally giving the IIS_IUSRS group permission to the directory works.

tsells
  • 2,751
  • 1
  • 18
  • 20
  • 1
    I added that user with full control to the directory and it still throws that error :( – chobo Feb 26 '12 at 20:47