Asp.net 4.0 UpdatePanel error: Sys.WebForms.PageRequestManagerServerErrorException: The status code returned from the server was: 12002

StackOverflow https://stackoverflow.com/questions/11584829

Question

I have a process that takes about 15-20 seconds to executed and at the end it updates a updatepanel to refresh a gridview

But it keeps me bringing me this error:

Microsoft JScript runtime error: Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server. The status code returned from the server was: 12002

I have extensively searched for answers everywhere and they keep pointing to this

httpRuntime maxRequestLength="1024000" executionTimeout="999999" and AsyncPostBackTimeout ="360000" in the ToolkitScriptmanager

It doesn't work for me, can anybody please suggest anything that will help me? Here are part of the code:

<%@ Page Title="" ....AsyncTimeout="36000" EnableEventValidation="false" ValidateRequest="false" %>
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" AsyncPostBackTimeout ="360000" >
</asp:ToolkitScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:Button ID="BtnGeneraPed" runat="server" Text="GP" Height="45px" Width="148px"/>
<asp:UpdateProgress ID="UpdateProgress1" runat="server">
<ProgressTemplate>
<table>
<tr><td><img alt="Cargando" src="../images/loading.gif" /></td></tr></table>
</ProgressTemplate>
</asp:UpdateProgress>
<asp:GridView ID="GV" runat="server" BackColor="White" 
......
</asp:GridView>
</ContentTemplate>
</asp:UpdatePanel>
Was it helpful?

Solution

So after almost 2 days I finally could figure this out...

It was extremely simple... I was testing and developing this in a machine with Windows XP and IE 8.... I tested it in Firefox and Chrome and the results where positive, no error

The issue was related to ReceiveTimeout settings from internet explorer 8.. it was to short

The solutions is in this article:
http://intersoftpt.wordpress.com/2009/06/23/resolve-page-cannot-be-displayed-issue-in-ie8/

OTHER TIPS

I had a similar problem in IE 8 (got a little further in Chrome) on the web server where I published my site, just there was no ReceiveTimeout registry key to remove. Chrome still ultimately failed, but it wasn't related to this issue... seems IE 8 is pickier, I guess. I was using a Timer_Tick to update an UpdatePanel.

Figured out that I needed some references in my web.config file:

<system.web>
    <pages>
       <controls>
           <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
       </controls>
       <namespaces>
           <clear/>
           <add namespace="System" />

....

       </namespaces>
    <compilation targetFramework="4.0" debug="false">
        <assemblies>
            <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        </assemblies>
    </compilation>
    <httpHandlers>
        <remove verb="*" path="*.asmx"/>
        <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
    </httpHandlers>
    <httpModules>
        <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    </httpModules>
</system.web>
<system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules>
        <add name="ScriptModule" preCondition="integratedMode" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    </modules>
    <handlers>
        <remove name="WebServiceHandlerFactory-Integrated"/>
        <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
        <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    </handlers>
</system.webServer>

You can find these sections in the web.config at C:\Program Files (x86)\Microsoft ASP.NET\ASP .NET 2.0 AJAX Extensions\v1.0.61025 if you've installed the ASP .NET 2.0 AJAX Extensions, another step to perform that could cause an error like this.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top