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

Upload file Problem

3 Answers 99 Views
FileExplorer
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 21 Mar 2014, 08:42 PM
Hey,

i recently updated the Telerik.Web.UI dll to version: 2013.3.1114.40

since then i've been getting this error:

Method not found: 'Int32 Telerik.Web.UI.UploadedFile.get_ContentLength()'.

when i try to upload a doc. this is happening on the following line:

byte[] bytes = new byte[file.ContentLength];
file.InputStream.Read(bytes, 0, file.ContentLength);

can anybody help on this?

Thanks,
Tony.

3 Answers, 1 is accepted

Sort by
0
Ianko
Telerik team
answered on 26 Mar 2014, 09:45 AM
Hello Tony,

This matter is also discussed in this forum thread. As suggested there, please try if the provided solutions helps you with the problem. If not, it would be helpful if you could provide more details about the built project. Even better, attach a simple project with which we could be able to replicate the encountered behavior.

Regards,
Ianko
Telerik
 

Build cross-platform mobile apps using Visual Studio and .NET. Register for the online webinar on 03/27/2014, 11:00AM US ET.. Seats are limited.

 
0
PDSB
Top achievements
Rank 1
answered on 11 Apr 2015, 05:05 AM

Hi,

we also having the same problem. It is working fine when using trail version. I have done below steps in order to use the licensed version

1- remove trial dll and replace with licensed one

2- add the binding in the web.config as this app is develop using trial

 

what else do i need to do?

0
Vessy
Telerik team
answered on 15 Apr 2015, 01:46 PM
Hi Lim,

I assume that the used by you trial version of the controls has been earlier than our Q2 2013 BETA (2013.2.522) release where the int64 change has been made. As discussed in the linekd by Ianko forum thread, it seems that DNN has some logic expecting that the return value of the get_ContentLength() method will be of type int32. This means that upgrading the controls to a newer version will not fix the problem, as currently this method returns int64. You can try too cast the UploadFile lenght to int32 as suggested here:
http://www.telerik.com/forums/broken-backwards-compatibility-on-contentlength-property#VsWfufNUb0mUeLLLnLbZyg
or here:
http://www.telerik.com/forums/broken-backwards-compatibility-on-contentlength-property#TT8iH5EqTEqodch242FhkQ

Nevertheless, I would advice that you contact the DNN support and report this issue to them so they can handle it internally and fix it for there future versions.

Regards,
Vessy
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
FileExplorer
Asked by
Tony
Top achievements
Rank 1
Answers by
Ianko
Telerik team
PDSB
Top achievements
Rank 1
Vessy
Telerik team
Share this question
or