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

RadAjaxManager Request Aborted

1 Answer 131 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Chris
Top achievements
Rank 1
Chris asked on 17 Nov 2010, 11:37 PM
Hi,

I'm running into an odd problem where my long-running ajax request is being aborted. The aspx page is as follows:

<form id="form1" runat="server">
    <telerik:RadScriptManager ID="ScriptManager" runat="server" />
    <telerik:RadAjaxManager id="RadAjaxManager1" runat="server" RequestQueueSize="100" OnAjaxRequest="AjaxManager_OnRequest" ClientEvents-OnRequestStart="onRequestStart();" ClientEvents-OnResponseEnd="closeWindow();">
    </telerik:RadAjaxManager>
 
 
    <script language="javascript" type="text/javascript">
        function onRequestStart() {
            alert('Ajax request starting');
        }
 
        function closeWindow() {
            var win = window.frameElement.radWindow;
            win.BrowserWindow.redirect_to_default();
        }
    </script>
    <telerik:RadAjaxPanel ID="RadAjaxPanel" runat="server">
     
    </telerik:RadAjaxPanel>
    <telerik:RadProgressManager ID="ProgressManager" EnableMemoryOptimization="true" runat="server" />
    <telerik:RadProgressArea ID="ProgressArea"  runat="server" Skin="Windows7" />       
     
    <telerik:RadCodeBlock ID="cb1" runat="server">
    <script language="javascript" type="text/javascript">
        var isRunOnce = false;
        function pageLoad() {
            if (!isRunOnce) {
                var manager = $find("<%= RadAjaxManager1.ClientID %>");
                if (manager)
                    manager.ajaxRequest('<%=Request.QueryString["g"] %>');
                isRunOnce = true;
            }
        }
    </script>
    </telerik:RadCodeBlock>
</form>

However, every time the page executes the progress bar gets to 35% (it takes it a few minute to get there) and then Firebug shows that the request has been aborted.

I don't believe another request is starting because the onRequestStart() method is only executed once.. but closeWindow() method is executed (right after Firebug displays the 'aborted' status)

Does anybody have any ideas what could be causing this?

Thanks.

- Chris

1 Answer, 1 is accepted

Sort by
0
Chris
Top achievements
Rank 1
answered on 18 Nov 2010, 08:40 PM
Thought I would post my resolution to this problem, in case anybody else has it.

In the RadScriptManager make sure you have set "AsyncPostBackTimeout" as well as the executionTimeout in the web.config. I had set the executionTimeout, but wasn't aware of the AsyncPostBackTimeout.
Tags
Ajax
Asked by
Chris
Top achievements
Rank 1
Answers by
Chris
Top achievements
Rank 1
Share this question
or