This is a migrated thread and some comments may be shown as answers.

How to retry AJAX call on error?

1 Answer 13 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Paul Buxton
Top achievements
Rank 1
Paul Buxton asked on 28 Aug 2013, 03:51 PM
Hi,

We are using Telerik Rad AJAX  (2010 Q3) version 1.8.8   (RadJax.Net2 library).

If one webserver goes down, the ajax call may be sent before the load balancer realises a webserver has failed.  This results in the load balancer sometimes sending the ajax request to a now non-existent webserver.   

Obviously this results in a 404.

I have a handler for RadAjaxmanager OnRequestError event, which simply puts a JS Alwert on screen, and returns FALSE and this works.

Is there........

1. Any way we can handle this more gracefully - as any subsequent AJAX call seems to be ignored after the 404....
2. Automatically retry the AJAX call?

What is Teleriks (or any body elses) recommendation?

Thanks 

1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 02 Sep 2013, 01:34 PM
Hello Paul,

Please note that the "RadAjaxManager" control for ASP.NET AJAX has no "OnRequestError" event. This event was present in our oldest (no longer supported) controls for ASP.NET (you could read about the migration from RadAjax for ASP.NET to RadAjax for ASP.NET AJAX here).

Nevertheless, I would highly recommend that you upgrade to our latest RadControls version, since lots of improvements were introduced to our product.

As for the error handling you could have a look at our help article "Error Handling for Ajax Requests".

Hope that helps.

Regards,
Konstantin Dikov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Ajax
Asked by
Paul Buxton
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or