title: Copying files to web application folder in IIS causes file permission issues
body: <p>We have been having issues migrating to a new IIS server as many of the documents accessible through our web apps cannot be edited. This includes things such as XML files we use for settings.</p>
  
  <p>When we try and overwrite existing files (that have been copied from the old IIS server) with new versions, for instance a new settings.xml file, we get permission denied. We have a number of things to give the app pool permission to overwrite files but we have not been successful. This includes giving the <code>NETWORK SERVICE</code> user account full control over the file as well as the folder.</p>
  
  <p>This issue, however, goes away if we delete these files and regenerate them from scratch. For instance the settings.xml file can be deleted manually, then the app can regenerate one with default values. This works fine.</p>
  
  <p>Basically the issue is that if we copy files ourselves into the folder, the web app throws an </p>
  
  <blockquote>
    <p>"Access to the path [..FILENAME..] denied"</p>
  </blockquote>
  
  <p>however we remove that file and allow the web app to generate the file on it's own, it then has full access to the file and can overwrite/write to it without an issue.</p>
  
  <p>While we can obviously go through this process file by file, we are looking for a more sustainable solution so that we do not have keep deleting/regenerating files in the future.</p>