RadAjaxManager Request Aborted

2 posts, 0 answers
  1. Chris
    Chris avatar
    2 posts
    Member since:
    Oct 2010

    Posted 17 Nov 2010 Link to this post

    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
  2. Chris
    Chris avatar
    2 posts
    Member since:
    Oct 2010

    Posted 18 Nov 2010 Link to this post

    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.
Back to Top