As part of some code logic, the component downloads the user uploaded files to a specific directory.
I am using
System.IO.File.Delete(file1);
System.IO.File.Delete(file2);
to delete the files. I don’t think the local system account IUSR account has permissions to do that.
What are the best practices to handle deletion of files in ASP.NET?
1 Answer