This is a migrated thread and some comments may be shown as answers.

Invalid Cross-Thread

3 Answers 69 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Nelson
Top achievements
Rank 1
Nelson asked on 08 Jun 2011, 03:09 PM
Hi,

I use in my application RadUpload from telerik.

I have no problem, when upload small multi files, however when I want upload two big files, he give me a Invalid Cross-Thread exception.

You can see in the image.

Note that I have this MaxFileSize="10000000" MaxUploadSize="10000000" and the files are smaller than that.

And if the first file is the smallest one, and the second the big one, he can upload without a problem.

Any help?

3 Answers, 1 is accepted

Sort by
0
Nelson
Top achievements
Rank 1
answered on 09 Jun 2011, 09:40 AM
Hi,

I already fix the problem. All I did was increase the buffer size and that way works good.
0
Mariusz
Top achievements
Rank 1
answered on 09 Nov 2011, 11:14 AM
I have the same problem. Two files with sizes above 5MB throw cross-thread exception (just when first file upload is about to be finish)

Changing the buffer size does affect the issue, however if i put too large number into buffer size i get some other errors.

Wiersz: 56
Błąd: Unhandled Error in Silverlight Application
Code: 4004   
Category: ManagedRuntimeError      
Message: System.ArgumentNullException: Value cannot be null.
Nazwa parametru: key
   w System.ThrowHelper.ThrowArgumentNullException(ExceptionArgument argument)
   w System.Collections.Generic.Dictionary`2.FindEntry(TKey key)
   w System.Collections.Generic.Dictionary`2.ContainsKey(TKey key)
   w Telerik.Windows.Controls.RadUpload.OnFileUploadCompleted(Object sender, EventArgs e)    


Now the buffer size is like 13107200B and I would like to keep it that way or even decrease it. But what if someone uploads a file that would exceed bs quota?

RB
0
Tina Stancheva
Telerik team
answered on 14 Nov 2011, 10:28 AM
Hi Rafal,

I wasn't able to reproduce the exception on our side and this is why I wanted to ask you if you can send a support ticket with a solution where it can be reproduced. This way we will be able to further investigate the case.

Also, since you're uploading large files you may need to configure your server to be able to accept larger chunks of data. You can do this from the web.config file by setting a larger maxRequestLength with the following code:
<configuration>
    <system.web>
        <httpRuntime  maxRequestLength="10000000" executionTimeout="3600" />
        <compilation debug="true" targetFramework="4.0" />
    </system.web>
</configuration>
You can find more info here. Please let us know how it goes.

Regards,
Tina Stancheva
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Upload
Asked by
Nelson
Top achievements
Rank 1
Answers by
Nelson
Top achievements
Rank 1
Mariusz
Top achievements
Rank 1
Tina Stancheva
Telerik team
Share this question
or