Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Upload > Repeated calls to Repeated calls to raduploadprogresshandler.ashx after Ajax call

Not answered Repeated calls to Repeated calls to raduploadprogresshandler.ashx after Ajax call

Feed from this thread
  • Mike avatar

    Posted on Feb 6, 2012 (permalink)

    Here's the issue:

    When I have a RadUpload control on the page and then do any type of Ajax call before a submit, there is repeated calls to Raduploadprogresshandler.ashx until the browser is shut down. This issue was also documented here:

    http://www.telerik.com/community/forums/aspnet-ajax/upload/mulitple-requests-to-telerik-raduploadprogresshandler-ashx.aspx 

    but, I tried both of those fixes and neither worked completely. Adding:

    <add key="AllowCustomProgress" value="false"/> 

    to the web.config worked, but only if the RadUpload control did not have a file already selected.

    What is the correct way of avoiding this issue?

    Thanks!

    - Mike

    Reply

  • Dimitar Terziev Dimitar Terziev admin's avatar

    Posted on Feb 9, 2012 (permalink)

    Hi Mike,

    The workaround suggested in the forum thread you have mentioned  is indeed valid only when there is no file selected in the RadUpload. Please try to add the following code , right after the declaration of your RadScriptManager or ScriptManager:
    <script type="text/javascript">
     
                Telerik.Web.UI.RadProgressManager.prototype._clientSubmitHandler = function (eventArgs) {
                     
                    var cancelArgs = new Sys.CancelEventArgs();
     
                    this.raiseEvent('submitting', cancelArgs);
                    if (cancelArgs.get_cancel()) {
                        return $telerik.cancelRawEvent(eventArgs);
                    }
     
                    if (!this._allowCustomProgress) {
                        var hasFiles = false;
     
                        var inputs = $telerik.$("input[type='file']");
                        $telerik.$.each(inputs, function () {
                            if (this.value != "" && !Sys.WebForms.PageRequestManager.getInstance().get_isInAsyncPostBack()) {
                                hasFiles = true;
                                //exit the loop
                                return;
                            }
                        });
     
                        if (!hasFiles)
                            return;
                    }
                }
            </script>


    Kind regards,
    Dimitar Terziev
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

  • Mike avatar

    Posted on Feb 10, 2012 (permalink)

    Hi,

    I code snippet above does the trick, thanks! Is this workaround going to be fixed anytime soon? That is - should I remove this fix after the next release?

    Thanks,

    Mike Oliver

    Reply

  • Dimitar Terziev Dimitar Terziev admin's avatar

    Posted on Feb 14, 2012 (permalink)

    Hi Mike,

    I'm glad that the overwrite provided is working for you. As for your question, yes this will be fixed in some of the upcoming internal builds, so my suggestion is to keep track of the release notes. This way when the issue is fixed you could remove the unnecessary code.

    Greetings,
    Dimitar Terziev
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > Upload > Repeated calls to Repeated calls to raduploadprogresshandler.ashx after Ajax call
Related resources for "Repeated calls to Repeated calls to raduploadprogresshandler.ashx after Ajax call"

ASP.NET Upload Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  |  Step-by-step Tutorial  ]