I am using the following method on RadAsyncUpload_FileUploaded:
This is from the Ajax Processing demo under Asynchronous Upload. The function works fine however the temp file is locked and cannot be deleted for approximately 5 minutes. If I comment out the contents of this function, the file can be deleted immediately. I am setting TemporaryFileExpiration = new TimeSpan(0, 0, 10)
so when the file delete occurs an event is logged in the Event Viewer similar to this:
I attempted to do a stream copy to work with the contents of the uploaded file separately but the temporary file still remains locked. It seems that a simple read of e.File.InputStream locks the file. Is there any way around this? The only way I have found so far is to set the TemporaryFileExpiration to a greater value (>10min). Thanks.