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

Setting RequestQueueSize causes Ajax requests to be repeated

4 Answers 290 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Dev
Top achievements
Rank 1
Dev asked on 01 Aug 2012, 04:38 PM
I have a RadAjaxManager in a master page with RequestQueueSize set to 5.  If I then make 5 Ajax requests in quick succession then the page ends up making 22 postbacks.  It seems that Ajax requests are either getting duplicated or are not getting removed from the queue upon completion and get repeated.  What can I do about this apart from giving up on RequestQueueSize?

4 Answers, 1 is accepted

Sort by
0
Dev
Top achievements
Rank 1
answered on 01 Aug 2012, 05:25 PM
Upon further investigation this appears to be due to the use of asp:UpdatePanel elements in the page coupled with the RadAjaxManager in the master page.

I have a sample project which demonstrates the issue but I can't upload it because .zip is barred, plus a Jing video of what happens: http://www.screencast.com/t/vne2JtsZ

The code for the click event of the button is simple:

protected void Button1_Click(object sender, EventArgs e)
{
    System.Threading.Thread.Sleep(500);
    var i = System.Convert.ToInt32(TextBox1.Text);
    TextBox1.Text = (++i).ToString();
}


The Default2.aspx page uses RadAjaxManager completely, Default.aspx uses an UpdatePanael in the page.

So now my question is: is this something that Telerik are likely to fix?  Or do I now have to go through all our old pages and find all the UpdatePanels?
0
Dev
Top achievements
Rank 1
answered on 01 Aug 2012, 06:07 PM
I tried replacing all the update panels in the page with a RadAjaxManagerProxy but I can still replicate the looping behaviour.  This is embedded deeply into a large app so I can't upload an example, but the requests end when some limit is hit inside MicrosoftAjax.js:

RangeError: arguments array passed to Function.prototype.apply is too large
http://localhost/QFMUI/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_RadScriptManagerMain_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-GB%3afabb1efa-938f-494c-a9c4-f313dccf73fa%3aea597d4b%3ab25378d2
Line 6
0
Vasil
Telerik team
answered on 06 Aug 2012, 11:55 AM
Hi Rob,

You can send us formal support ticket, where you can upload the sample project that you have made (or post the code here if it is short enough).

I have tested the manager with RequestQueueSize=5 in sample scenario with button and label, and it is working correct.

The problem with UpdatePanel can be caused, because the UpdatePanels will make ajax without updating the internal properties of the RadAjaxManager. It still depends how exactly you use the UpdatePanel, and what settings do you have for the manager. If you update different parts of the page, there will be no such endless loop whatsoever.

Kind regards,
Vasil
the Telerik team
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 their blog feed now.
0
Vasil
Telerik team
answered on 27 Aug 2012, 11:47 AM
Hi,

As discussed further in the support thread, currently we supports two scenarios with the Request Queue:

1. Using RadAjaxManager (or RadAjaxManagerProxy) and ajaxifying asp:Panel, asp:Button, asp:Label etc. In this case the Manager should not be used in combination of RadAjaxPanel or asp:UpdatePanel. It will work correct as your example in Default2.aspx

2. Using standalone RadAjaxPanel. In simple scenarios when you don't have many different parts of your site that should be updated, but you have only one part that should, you can use RadAjaxPanel with RequestQueueSize. It should work without any problem. In this case it is important not to have RadAjaxManager in your page. You can set the RequestQueueSize directly into the declaration of your RadAjaxPanel.

It is never suggested to use asp:UpdatePanels in combination with RadAjaxManager or RadAjaxPanel. This three controls should be used independently in each page and never mixed up.

Greetings,
Vasil
the Telerik team
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 their blog feed now.
Tags
Ajax
Asked by
Dev
Top achievements
Rank 1
Answers by
Dev
Top achievements
Rank 1
Vasil
Telerik team
Share this question
or