Hi,
I'm trying to upload some files via a form, and I have managed so far to
save the files on the server in a temporary directory using:
HttpPostedFile.SaveAs(string filename);
This is a necessary stage as I need to perform some tests on the file
before allowing it to be saved to its final destination directory. The
files being uploaded contain data, so it's necessary to test the
integrity of the data after uploading it.
The problem now is that, after I have uploaded and tested the data, I
then want to move the file (or delete it if it was not valid) to the
data directory. I then receive the following error:
"The process cannot access the file because it is being used by
another process."
I have tried to find a method of closing the file that has been saved by
the above method, but I can't seem to find one. Any suggestions?
--
Dylan Parry
http://webpageworkshop.co.uk -- FREE Web tutorials and references
Listening to: Rush - Cygnus X-1 Book II : Hemispheres