On Upload Failure, MaxUploads = MaxUploads + 1?

Mar 17, 2010 at 3:23 PM
Edited Mar 17, 2010 at 3:26 PM
Here is my HTML to include v3.0 of the control: <asp:Silverlight ID="Xaml1" Windowless="true" runat="server" Source="~/ClientBin/mpost.SilverlightMultiFileUpload.xap" MinimumVersion="2.0.31005.0" Width="450" Height="280" InitParameters="HttpUpload=true,MaxFileSizeKB=,MaxUploads=1,FileFilter=,CustomParam=yourparameters,DefaultColor=White" /> Background: In my implementation, as the files are completed I insert records into a database. With multiple users, or if I set MaxUploads > 1, it's possible for some race conditions to occur and HttpUploadHandler catches a "Row not found or changed" exception. This much is understandable, and acceptable to a certain degree in my implementation. The number of upload fails is significantly reduced when MaxUploads = 1. Problem: After each upload failure, the control looks like it's uploading 1 more file (as though MaxUploads has been incremented). Of course ,in my situation, this only makes the exceptions and upload failures happen more often. I'm wondering if anyone else can recreate this (you just need to have the HttpUploadHandler throw an exception every couple of uploads)? or is this a known issue? Thanks, sorry this is showing up so hard to read... I don't know why it's not displaying my carriage returns.
Mar 17, 2010 at 7:20 PM

Thanks for mentioning this bug.
I was able to reproduce it and I fixed it for the Silverlight 4 release in changeset: 45565

The problem was in the file: mpost.SilverlightMultiFileUpload.Classes.HttpFileUploader.cs

If you want to fix it yourself in your current code (v3). Just copy the content of this function (in HttpFileUploader.cs) from v4 to v3:
 private void ReadHttpResponseCallback(IAsyncResult asynchronousResult)

Mar 17, 2010 at 8:25 PM

Thanks, love the control btw!