title: ASP.NET Deleting files on the file system?
body: <p>As part of some code logic, the component downloads the user uploaded files to a specific directory.</p>
  
  <p>I am using </p>
  
  <pre><code>System.IO.File.Delete(file1);
  System.IO.File.Delete(file2);
  </code></pre>
  
  <p>to delete the files. I don't think the local system account IUSR account has permissions to do that. </p>
  
  <p>What are the best practices to handle deletion of files in ASP.NET?</p>