G
Guest
Hi there
I am having trouble deleting an uploaded file that I have just written to
disc. I am using the SaveAs method of a HttpPostedFile to write the file to
disc, then straight after I'm trying to use kill(FILE) to delete it. I
get the error "The process cannot access the file "FILE.JPG" because it is
being used by another process."
If I use the Explorer-program to try and delete the file afterwards I get
the error "Cannot delete FILE.JPG: There has been a sharing violation. The
source or destination file may be in use"
Does anyone have a solution?
Best regards
Michael K.
I am having trouble deleting an uploaded file that I have just written to
disc. I am using the SaveAs method of a HttpPostedFile to write the file to
disc, then straight after I'm trying to use kill(FILE) to delete it. I
get the error "The process cannot access the file "FILE.JPG" because it is
being used by another process."
If I use the Explorer-program to try and delete the file afterwards I get
the error "Cannot delete FILE.JPG: There has been a sharing violation. The
source or destination file may be in use"
Does anyone have a solution?
Best regards
Michael K.