Hi,
I'm using the FileUpload control to upload and process a CSV file. It all works fine, except after the processing is complete, the file remains locked and I can't edit it with (for example) WordPad. The code is simple:
sTempFile = Path.GetTempFileName();
cBulkUpload.SaveAs(sTempFile);
Process(sTempFile);
File.Delete(sTempFile);
I tried adding:
cBulkUpload.PostedFile.InputStream.Close();
cBulkUpload.PostedFile.InputStream.Dispose();
But no difference. Note that it's the SOURCE file that remains locked, not the temp file I save it to on the server.
Any reason it would do this?
ROSCO
...
Go to the complete details ...