I posted a suggestion in another forum, suggesting to stream the file as well, after the database has been checked for sufficient permissions to download it again.
One solution to overcome the failed download is to set a flag in the database after the file has been completed. I think the BinaryWrite method (which you use to stream the file) is a blocking call; that is, the function will be performed on the main thread, blocking other code following it. If the line directly after the BinaryWrite performs a database update, you can be pretty sure that once you do the update, you have a valid download.
(See Vincent, cross-posting causes more problems than it solves. Now the questions and answers are all over the place, forcing everyone to follow a couple of threads and do cross-referencing all the time.... ;))
Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
|