c# - Delete file: The process cannot access the file -
i use mvc , have controller takes file name , deletes server, when use visual studio development server on local machine, page(controller) delete file on production server i'm getting following error:
the process cannot access file 'filename' because being used process system.io.file.delete(server.mappath("~/content/myfolder/" + id));
before line of code custom request validation dont access file. file has been saved page right before page.
in fact want know process may accessing file. , if code previous pages(controllers) may cause problem? have searched found nothing useful.
you check identity under application pool of application runs, check permissions account. check process locked file, try this link.
Comments
Post a Comment