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:
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
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
9 Answers, 1 is accepted
0
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:
Kind regards,
Dimitar Terziev
the Telerik team
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 >>
0

Mike
Top achievements
Rank 1
answered on 10 Feb 2012, 05:37 PM
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
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
0
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
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 >>
0

richard
Top achievements
Rank 1
answered on 17 Apr 2014, 05:54 PM
I am having the same problem when using the progress bar on a page.
I have a progress bar used while a page is loading alot of data from the database. So I tried the "fix" above and now the progress bar does not show at all....all of the unneeded calls from the ashx stopped but now no progress bar at all.
This problem is many years old is there a real fix or?????
What do i do?
I have a progress bar used while a page is loading alot of data from the database. So I tried the "fix" above and now the progress bar does not show at all....all of the unneeded calls from the ashx stopped but now no progress bar at all.
This problem is many years old is there a real fix or?????
What do i do?
0

Mike
Top achievements
Rank 1
answered on 17 Apr 2014, 06:02 PM
I had to modify the above fix awhile ago as a new version of Telerik broke it. Here's our latest hack:
// "fix" for repeated progress calls after Ajax
if (typeof (Telerik) != "undefined" && typeof (Telerik.Web.UI.RadProgressManager) != "undefined")
{
Telerik.Web.UI.RadProgressManager.prototype._origClientSubmitHandler = Telerik.Web.UI.RadProgressManager.prototype._clientSubmitHandler;
Telerik.Web.UI.RadProgressManager.prototype._clientSubmitHandler = function (eventArgs)
{
var async = (eventArgs != null); // hack - assumption that param is null when called via non-ajax postback, otherwise contains ajax element info
if (async)
return;
this._origClientSubmitHandler(eventArgs);
}
}
// "fix" for repeated progress calls after Ajax
if (typeof (Telerik) != "undefined" && typeof (Telerik.Web.UI.RadProgressManager) != "undefined")
{
Telerik.Web.UI.RadProgressManager.prototype._origClientSubmitHandler = Telerik.Web.UI.RadProgressManager.prototype._clientSubmitHandler;
Telerik.Web.UI.RadProgressManager.prototype._clientSubmitHandler = function (eventArgs)
{
var async = (eventArgs != null); // hack - assumption that param is null when called via non-ajax postback, otherwise contains ajax element info
if (async)
return;
this._origClientSubmitHandler(eventArgs);
}
}
0

richard
Top achievements
Rank 1
answered on 17 Apr 2014, 06:32 PM
Mike,
Thanks for the code but now my progress bar doesn't show at all.
Thanks for the code but now my progress bar doesn't show at all.
0
Hello Richard,
Could you please confirm that using the workaround posted by Dimitar Terziev did not work for your scenario and your progress bar does not show at all?
Regards,
Boyan Dimitrov
Telerik
Could you please confirm that using the workaround posted by Dimitar Terziev did not work for your scenario and your progress bar does not show at all?
Regards,
Boyan Dimitrov
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
0

richard
Top achievements
Rank 1
answered on 22 Apr 2014, 02:43 PM
That is correct ** it did not work **
0
Hello Richard,
I am afraid that I am not able to replicate the described issue. We would need a sample project that replicates this problem so we can investigate this issue at our end and provide you a proper solution for your case. Since this is a forum thread you will not be able to attach any files so I would ask you to open a support thread and attach a sample project or simply a page that replicates the described problem. Here you may find some instruction on how to isolate a problem in a runnable sample project.
Regards,
Boyan Dimitrov
Telerik
I am afraid that I am not able to replicate the described issue. We would need a sample project that replicates this problem so we can investigate this issue at our end and provide you a proper solution for your case. Since this is a forum thread you will not be able to attach any files so I would ask you to open a support thread and attach a sample project or simply a page that replicates the described problem. Here you may find some instruction on how to isolate a problem in a runnable sample project.
Regards,
Boyan Dimitrov
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.