CopyTo method fails with large files

Last post 12-15-2009, 9:14 PM by cutechat. 16 replies.
Sort Posts: Previous Next
  •  11-24-2009, 7:32 PM 57401

    CopyTo method fails with large files

    Hi,
    I'm uploading a 450MB file. The file uploads well into de  temp directory. But when calling this method 
                                                          args.CopyTo(
    "~/Downloads/" args.FileName);
    with in Uploader_FileUploaded event I receive de folowing error message

    "Unable to find library '/AjaxCallObject.js'. Copy the file to the required location, or change the 'scriptPath' setting at magicAjax section web.config"
     
    I only have this error when upload large files, the same code works very well with small files, ex: 4MB
     
    Note:
    - The application is running into a shared hosting. May it has to do with RAM memory limit?
     
    - Is it possible to prevent the deletion of the files in Temp folder after they are uploaded?
     
    Thanks,
     
    Ariel
    Filed under:
  •  11-24-2009, 8:51 PM 57403 in reply to 57401

    Re: CopyTo method fails with large files

    Ariel,
     
    If you remove the CopyTo line , and upload the 450MB file again , will you get such error again ?
     
    Regards,
    Terry
  •  11-25-2009, 6:36 AM 57417 in reply to 57403

    Re: CopyTo method fails with large files

    I get te error with the CopyTo method, if i remove this line  i dont have the error.
    Its ocurrs only with large files.
     
    what can i do?
     
    Thanks
    Ariel
  •  11-25-2009, 6:43 AM 57418 in reply to 57417

    Re: CopyTo method fails with large files

    Ariel
     
    CopyTo may take a long time and the ASP.NET page will timeout.
     
    Please try MoveTo , or set the Server.ScriptTimeout to a larger value.
     
    Regards,
    Terry
     
  •  11-25-2009, 7:00 AM 57419 in reply to 57418

    Re: CopyTo method fails with large files

    Is it possible to prevent the deletion of the files in Temp folder after they are uploaded?
    if possible, it is not necessary to execute an extra operation such as copyTo or MoveTo
    Thanks,
    Ariel
     
  •  11-25-2009, 2:58 PM 57429 in reply to 57418

    Re: CopyTo method fails with large files

    cutechat:
    Ariel
     
    CopyTo may take a long time and the ASP.NET page will timeout.
     
    Please try MoveTo , or set the Server.ScriptTimeout to a larger value.
     
    Regards,
    Terry
     
     
    Terry,
     
    I tried using the MoveTo method and recieved the same error.
    Then I changed the Server.ScriptTimeout to a larger value and got no error, but the file had not been moved.
     
    What about avoiding the temp folder to be deleted. Is it possible?
     
    Thanks,
     
    Ariel
     
  •  11-26-2009, 10:09 AM 57443 in reply to 57429

    Re: CopyTo method fails with large files

    Abosho:
    cutechat:
    Ariel
     
    CopyTo may take a long time and the ASP.NET page will timeout.
     
    Please try MoveTo , or set the Server.ScriptTimeout to a larger value.
     
    Regards,
    Terry
     
     
    Terry,
     
    I tried using the MoveTo method and recieved the same error.
    Then I changed the Server.ScriptTimeout to a larger value and got no error, but the file had not been moved.
     
    What about avoiding the temp folder to be deleted. Is it possible?
     
    Thanks,
     
    Ariel
     
     
    All temp files in the temp folder will be recylced automatically.  There is no point to use the file in the temp folder.  Only the persisted files can be deleted after 6 hours. http://ajaxuploader.com/Demo/Persist-upload-file.aspx
     
     

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  11-26-2009, 10:30 PM 57449 in reply to 57401

    Re: CopyTo method fails with large files

    Ariel,
     
    You can try/catch the CopyTo/MoveTo to check whether it's throw error.
     
    Regards,
    Terry
  •  12-01-2009, 5:18 PM 57529 in reply to 57449

    Re: CopyTo method fails with large files

    Terry, Heres is the capture of my screen widht the error. Im using MoveTo .... The error took place only with large file for ex 400MB
    Tanks, Ariel
  •  12-02-2009, 6:59 AM 57536 in reply to 57529

    Re: CopyTo method fails with large files

    Ariel,
     
    That is a strange error.
     
    Can you determine which mode you are using ?
     
    IFrame ? Flash ? Sliverlight ?
     
    If your IE does not install Flash/Silverlight , uploader will use IFrame mode, and then you can't select multiple files in the dialog.
     
    I think that maybe a bug of IFrame mode.
     
    Regards,
    Terry
  •  12-02-2009, 8:23 PM 57547 in reply to 57536

    Re: CopyTo method fails with large files

    Terry,
    I solve the error, I put in the pages   <%@ Page Language="C#" EnableViewStateMac="false"%> and it works fine.
    But now I have another error.   The file upload into the temp directory but it has the name uploadingXXXXX.resx ... and it not was copy... and the name does not change to persisted.XXXXX.resx
     
    Here are the screens, first the screen with the error. And second is a capture of the FTP, so you can see the name of the file
     
      
  •  12-03-2009, 12:43 AM 57551 in reply to 57547

    Re: CopyTo method fails with large files

    Hi,
     
    This error often throws when the server side uploader control can't intercept the Ajax validating request.
     
    Do you get such error only when upload large files ?
     
    Do you add the uploader into the page dynamically ?
     
    Regards,
    Terry
  •  12-03-2009, 12:46 AM 57552 in reply to 57547

    Re: CopyTo method fails with large files

    It seems that error relative to the ViewStateMac error.
     
    You disable the ViewStateMac , but get another error , because the posted content is wrong ,
     
    I think that is a bug of uploader while processing your big file . 
     
    Please try the last version , we did update that issue for the big ViewState case.
     
    Regards,
    Terry
  •  12-03-2009, 10:47 AM 57572 in reply to 57552

    Re: CopyTo method fails with large files

    Terry,
    The error only appear with large files.
     
    I obtain the las version of the uploder here http://ajaxuploader.com/? With the button download now?
     
    Thanks,
    Ariel
     
     
  •  12-03-2009, 12:53 PM 57585 in reply to 57572

    Re: CopyTo method fails with large files

    Abosho:
    Terry,
    The error only appear with large files.
     
    I obtain the las version of the uploder here http://ajaxuploader.com/? With the button download now?
     
    Thanks,
    Ariel
     
     
     
    yes, that's the latest build.

    asp.net Chat http://cutesoft.net/ASP.NET+Chat/default.aspx
    Web Messenger: http://cutesoft.net/Web-Messenger/default.aspx
    asp.net wysiwyg editor: http://cutesoft.net/ASP.NET+WYSIWYG+Editor/default.aspx
    asp wysiwyg html editor: http://cutesoft.net/ASP
    asp.net Image Gallery: http://cutesoft.net/ASP.NET+Image+Gallery/default.aspx
    Live Support: http://cutesoft.net/live-support/default.aspx

  •  12-15-2009, 11:29 AM 57761 in reply to 57585

    Re: CopyTo method fails with large files

    I am experimenting the following problem:
    Once I upload the file I try to copy it to another folder.
    Some times the whole upload-copy process freezes on 100%, and later on, recieve a messege indicating that the file does not exists.

    I am suposing that the file is being deleted from the temp folder before it complets the copy operation.
    So...how does the temp folder cleanup works?
     - Does it delete all the "uploaded---*****" files every an amount of time? In that case, I am exposed to that behavior randomly
     - Does it delete each "uploaded---*****" file X time after it has been created? In that case, how much time after? I would not understand why the copy operation cannot be completed before it is cleaned up.

    Could the uploader that persists the files more time in the temp folder helps?

    Thanks,

    Ariel

    Filed under:
  •  12-15-2009, 9:14 PM 57767 in reply to 57761

    Re: CopyTo method fails with large files

    Ariel,
     
    The files will be deleted , if their modified-time pass for 6 hours.
     
    Regards,
    Terry
     
View as RSS news feed in XML