This project has moved and is read-only. For the latest updates, please go here.


DB file download corruption


I like your control. The problem I am having is file corruption in my database. I have the http handler push the file into a database and then allow users to download the file if they need it. The upload works fine but on download some files are unreadable once it is stream down to the user. Also, the final file size is not the same.
Closed Aug 30, 2011 at 8:20 AM by mpost
Solved by user. No code change needed.


mpost wrote Jun 7, 2011 at 12:37 PM

Make sure to let the upload finish and after the complete file is finished, store it in the database.

Corropt files doesn't happen a lot with the uploader. Maybe the downloading of the files is the issue?

nitebladelive wrote Jun 7, 2011 at 4:38 PM

Thanks mpost. I spent a couple of days debugging the issue and running through scenarios. I have found the problem and solved it. The issue is not with the Silverlight uploader but with the web handler. I was chunking the files into the database. When it came to the last bytes of the file it pushed the whole buffer into the db instead of the last bytes. The file became corrupted with extra data and filesize was wrong.

wrote Aug 30, 2011 at 8:20 AM

wrote Feb 21, 2013 at 11:48 PM

wrote May 16, 2013 at 11:31 AM