Error uploading large (> 2gb) file

4 posts, 0 answers
  1. Michael
    Michael avatar
    3 posts
    Member since:
    Aug 2012

    Posted 14 Oct 2013 Link to this post

    We are uploading an unusually large file of 2.6gb using RadAsyncUpload but it appears to randomly stop (anywhere between 1 and 5%) with the following Javascript error


    Looking further into the error with Firefox shows the following details...

    Post: {"TotalChunks":1229,"ChunkIndex":0,"TotalFileSize":2577377324,"UploadID":"1381758285922File.zip"}

    Response:

    Server Error in '/' Application.
    Value was either too large or too small for an Int32.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
     
    Exception Details: System.OverflowException: Value was either too large or too small for an Int32.
     
    Source Error:
     
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
     
    Stack Trace:
     
     
    [OverflowException: Value was either too large or too small for an Int32.]
       System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) +9594371
       System.ComponentModel.Int32Converter.FromString(String value, NumberFormatInfo formatInfo) +53
       System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) +302
     
    [Exception: 2577377324 is not a valid value for Int32.]
       System.ComponentModel.BaseNumberConverter.ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, Object value) +489
       System.ComponentModel.TypeConverter.ConvertFromInvariantString(String text) +43
       System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject) +510
       System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject) +147
       System.Web.Script.Serialization.ObjectConverter.AssignToPropertyOrField(Object propertyValue, Object o, String memberName, JavaScriptSerializer serializer, Boolean throwOnError) +220
       System.Web.Script.Serialization.ObjectConverter.ConvertDictionaryToObject(IDictionary`2 dictionary, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject) +1175
       System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeInternal(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject) +71
       System.Web.Script.Serialization.ObjectConverter.ConvertObjectToTypeMain(Object o, Type type, JavaScriptSerializer serializer, Boolean throwOnError, Object& convertedObject) +147
       System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer, String input, Type type, Int32 depthLimit) +66
       System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(String input) +74
     
    [TargetInvocationException: Exception has been thrown by the target of an invocation.]
       System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +0
       System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner) +72
       System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +251
       System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +28
       Telerik.Web.UI.AsyncUpload.SerializationService.Deserialize(String obj, Type type) +237
       Telerik.Web.UI.AsyncUploadHandler.HandleChunkUploadRequest(String serializedMetaData) +31
       Telerik.Web.UI.AsyncUploadHandler.ProcessRequest(HttpContext context) +262
       Telerik.Web.UI.HandlerRouter.ProcessHandler(String handlerKey, HttpContext context) +92
       Telerik.Web.UI.HandlerRouter.ProcessHandler(HttpContext context) +54
       Telerik.Web.UI.WebResource.ProcessRequest(HttpContext context) +39
       System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75

    So it looks like due to the file size in KB going over the limit for an Integer, the file is failing. Can anyone point me in the right direction of what to amend?

    Many thanks

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 16 Oct 2013 Link to this post

    Hi Michael,

    Earlier RadAsyncUpload had a size restriction of 2GB which has been resolved in the Q2 2013 release of Telerik RadControls for ASP.NET AJAX. In earlier versions the ContentLength property of the RadAsyncUpload was of type Int32 and hence you may receive errors such as 'Value was either too large or too small for an Int32' if you provide large values.
    In this latest release the type of the ContentLength properties in the AsyncUpload is changed to Int64 and hence it is capable to handle files with size more than 2GB.

    Thanks,
    Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Michael
    Michael avatar
    3 posts
    Member since:
    Aug 2012

    Posted 16 Oct 2013 Link to this post

    Thanks Shinu, we'll look at the options for us upgrading.

    In the meantime I presume this control should be fine for anything less than 2gb?

    Thanks,
    Michael
  5. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 17 Oct 2013 Link to this post

    Hi Michael,

    You can use the RadAsyncUpload (applicable to versions prior to Q2 2013) control to upload files with file size up to 2GB. You can have a look into this documentation to check the necessary Web.config and IIS settings required to support large file uploading.

    Thanks,
    Shinu.
Back to Top