Trying to test OnClientFileUploadFailed with RadAsyncUpload

2 posts, 0 answers
  1. Adam
    Adam avatar
    17 posts
    Member since:
    Sep 2012

    Posted 27 Jul 2015 Link to this post

    This might sound like an odd request for help; Trying to make it fail.  :-)

    I have an AsyncUpload control that I need to make fail temporarily.

    I've tried to switch off my network card (wifi) halfway through the upload but I just get a console error:


    POST http://myDomain.localhost/Telerik.Web.UI.WebResource.axd?type=rau 

    I would have thought this would cause the OnClientFileUploadFailed event fire, but it doesn't.  The progress bar stays and just the console error message is shown.

    Telerik control version : 2015.1.225.40

    Chrome version : 44.0.2403.107 m


    Any suggestions would be very much appreciated.  For either how to get the event to fire or why the OnClientFileUploadFailed event doesn't fire.


  2. Aneliya Petkova
    Aneliya Petkova avatar
    207 posts

    Posted 29 Jul 2015 Link to this post

    Hi Adam,

    The RadAsyncUpload's OnClientFileUploadFailed event basically fires when an error uploading the selected file has occurred. Common reason for this event firing is Telerik.Web.UI.WebResource.axd handler not being registered in the web.config. Another reason might be server-side error in custom upload handler is being used.

    For example if you disable the chunk upload and try to upload larger file, the error will be thrown.

    Attached is a sample project where you can test this.

    Another way is to set ChunkSize="5242880", which is 5 MB. The default value of maxRequestLength property is 4MB. So if you try to upload 5MB at a time, the event will be thrown.

    Hope this will be helpful.

    Aneliya Petkova
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top