I have an API that upload a file. Before saving it, the api check if an old file is exists (internal call the DB to get the old file name). If the old file exists, there is delete command (file.delete)
In order not to get UnauthorizedAccessException, I've added delete permission in NTFS for the specific folder for the IIS_USER group.
Is this OK? Theoretically can someone delete files from that folder trough HTTP?
Is there an option to preform the delete with another local user that have delete permissions trough the API (C#) that the application IIS_USER is activating it for delete command?
Thanks in advance for any advice. Yaniv.