title: IIS suddenly gets access denied when attempting to read web.config
body: <p>We have an intranet legacy app that is 95% replaced, but unfortunately the 5% is still necessary and not yet implemented in the new system.  One of the remaining functions accesses a piece of data in the <code>&lt;appSettings&gt;</code> section of the <code>web.config</code> file and today I was told that the data needed to be changed.  </p>
  
  <p>I went in as we have done many times before, copied the <code>web.config</code> to the server’s desktop, made a backup copy, edited the appSettings key, and then copied the <code>web.config</code> back out to the site’s location on the server.  Instead of updating as it always had before, now the site is unreachable and returns only the following error:</p>
  
  <p><img src="https://i.stack.imgur.com/lFa5H.png" alt="enter image description here"></p>
  
  <p>I’m fairly certain that it really can’t read the <code>web.config</code> file, because the web.config has customErrors turned off, but when accessed from outside of the server, it gives the generic IIS “Runtime Error” message, with the instructions on turning off customErrors. </p>
  
  <p>I’m at a real loss here, because that change to a non-configuration piece of data seems to have broken the whole thing.  Putting back the original copy did not fix the problem.  No permissions or other settings have changed in months (and have all been verified to still be the same as they should be).  I have been unable to Google-up anything useful related to this problem.  </p>