Sys.WebForms.PageRequestManagerParserErrorException:

Rate It (1)

Last post 04-03-2009 5:13 AM by srankamal. 8 replies.

Sort Posts:

  • Sys.WebForms.PageRequestManagerParserErrorException:

    08-01-2007, 5:58 AM
    • Member
      point Member
    • sagar.dhande
    • Member since 08-01-2007, 6:39 AM
    • Posts 2

    hi guys,

    i am working on ajax enabled asp.net 2.0 . i am displaying data in gridview. gridview is in update panel. when i click view button to populate data in gridview, get the following error very often.
     

    Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes of this error are when the response is modified by calls to Response.Write(),response filters,HttpModules, or server trace is enabled.
    Details: Error parsing near '    |<html>
    <head>
    '.

     

    i have gone through many posts, then i removed Response.Write. but, still problem persist. if  anyone has update on it, plz do post it. i am in gr8 need guys.

     THANKS.
     

     

  • Re: Sys.WebForms.PageRequestManagerParserErrorException:

    08-06-2007, 5:04 AM

     Hi,

    It's hard to tell why according to your description. There are many other possible causes besides Response.Write.

    The general idea is that the response should conform to certain format, for instance: "111|updatePanel|UpdatePanel1| .... ", otherwise, the ajax library won't be able to parse it. And an exception is thrown.

    You may use Fiddler to view the view the traffic, and you will see what response is returned from the server with the help of it. Then, it'll be easier to find out the real cause.

    Hope this helps.
     

  • Re: Sys.WebForms.PageRequestManagerParserErrorException:

    08-07-2007, 3:20 AM
    • Member
      point Member
    • sagar.dhande
    • Member since 08-01-2007, 6:39 AM
    • Posts 2

     

    thanx for responding. as per your suggestion i download and installed Fiddler. but as i am very new to this, i am not able to understand how the tracing is done exactly...and more, i dont get

    i am adding the trace file here. if u get anything out of it then please let me know.

     

     

    120
    258|updatePanel|UpdatePanel1|
                                                &nbsp;<span id="lblerrormsg" style="display:inline-block;color:Red;font-weight:bold;width:330px;">No Data Found</span>&nbsp;
                                               
                                            |
    111b
    <html>
        <head>
            <title>Session state has created a session id, but cannot save it because the response was already flushed by the application.</title>
            <style>
             body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
             p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
             b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
             H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
             H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
             pre {font-family:"Lucida Console";font-size: .9em}
             .marker {font-weight: bold; color: black;text-decoration: none;}
             .version {color: gray;}
             .error {margin-bottom: 10px;}
             .expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
            </style>
        </head>

        <body bgcolor="white">

                <span><H1>Server Error in '/DMS_V2' Application.<hr width=100% size=1 color=silver></H1>

                <h2> <i>Session state has created a session id, but cannot save it because the response was already flushed by the application.</i> </h2></span>

                <font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

                <b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

                <br><br>

                <b> Exception Details: </b>System.Web.HttpException: Session state has created a session id, but cannot save it because the response was already flushed by the application.<br><br>

                <b>Source Error:</b> <br><br>

                <table width=100% bgcolor="#ffffcc">
                   <tr>
                      <td>
                          <code>

    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.</code>

                      </td>
                   </tr>
                </table>

                <br>

                <b>Stack Trace:</b> <br><br>

                <table width=100% bgcolor="#ffffcc">
                   <tr>
                      <td>
                          <code><pre>

    [HttpException (0x80004005): Session state has created a session id, but cannot save it because the response was already flushed by the application.]
       System.Web.SessionState.SessionIDManager.SaveSessionID(HttpContext context, String id, Boolean&amp; redirected, Boolean&amp; cookieAdded) +163
       System.Web.SessionState.SessionStateModule.CreateSessionId() +78
       System.Web.SessionState.SessionStateModule.DelayedGetSessionId() +97
       System.Web.SessionState.SessionStateModule.ReleaseStateGetSessionID() +30
       System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs) +681
       System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +167
       System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously) +117
    </pre></code>

                      </td>
                   </tr>
                </table>

                <br>

                <hr width=100% size=1 color=silver>

                <b>Version Information:</b>&nbsp;Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42

                </font>

        </body>
    </html>
    <!--
    [HttpException]: Session state has created a session id, but cannot save it because the response was already flushed by the application.
       at System.Web.SessionState.SessionIDManager.SaveSessionID(HttpContext context, String id, Boolean& redirected, Boolean& cookieAdded)
       at System.Web.SessionState.SessionStateModule.CreateSessionId()
       at System.Web.SessionState.SessionStateModule.DelayedGetSessionId()
       at System.Web.SessionState.SessionStateModule.ReleaseStateGetSessionID()
       at System.Web.SessionState.SessionStateModule.OnReleaseState(Object source, EventArgs eventArgs)
       at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
       at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
    -->
    0

     

  • Re: Sys.WebForms.PageRequestManagerParserErrorException:

    08-07-2007, 4:53 AM

    The second response would cause the Ajax to complain.

    There is an exception thrown on your server, subsequently, a default error page is returned. The default has the following content:

    <html>
        <head>
            <title>Se ...................

     

    It's not a valid response that can be parsed.

    You need to debug your application to get rid of this exception.
     

  • Re: Sys.WebForms.PageRequestManagerParserErrorException:

    05-10-2008, 5:45 PM
    • All-Star
      17,453 point All-Star
    • albertpascual
    • Member since 05-23-2003, 2:11 PM
    • Riverside, CA
    • Posts 3,474
    • TrustedFriends-MVPs
    Cheers
    Al
    My Blog
    MapStats.NET
    Please click on 'Mark as Answer' if this post answered your question!
  • Re: Sys.WebForms.PageRequestManagerParserErrorException:

    10-08-2008, 3:42 PM
    • Participant
      1,733 point Participant
    • wsyeager
    • Member since 06-26-2002, 7:42 PM
    • Weston, Florida, USA
    • Posts 456

    Hi... I despeartely need some help...

    Everything works fine on my local machine, but when I upload it to a TEST web server, I am getting the above subject error.

    I have verified everything I can in accordance with this thread. Both servers are using the .Net 3.5 framework. I am also using the Ajax control toolkit, version 3.0.20820.16598. I am using the 3.5 version of the System.Web.Extensions namespace.

    I am not executing any response.write methods.

    I tried downloading Fiddler and using it, watched the video, but still don't know how to do a simple trace.

    The problem is occurring when I click a radio button, which then in turn updates a price on the page. The price is contained within an UpdatePanel like below:

    <code>

    <asp:UpdatePanel ID="UpdatePanelPrice" runat="server" UpdateMode="Conditional">
                                                    <ContentTemplate>
                                                        <table width="220" border="0" align="right" cellpadding="0" cellspacing="0" style="border-left: solid 1px #013E5C;
                                                            border-top: solid 1px #013E5C">
                                                            <tr>
                                                                <td width="42%" align="right">
                                                                    <span class="font14 green">
                                                                        <div id="divPrice" runat="server">
                                                                        </div>
                                                                        <asp:TextBox ID="txtPrice" runat="server" Visible="false"></asp:TextBox></span>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </ContentTemplate>
                                                    <Triggers>
                                                        <asp:AsyncPostBackTrigger ControlID="cbPhoneOptionsIndv" EventName="SelectedIndexChanged" />
                                                        <asp:AsyncPostBackTrigger ControlID="rblResidentialPkgs" EventName="SelectedIndexChanged" />
                                                        <asp:AsyncPostBackTrigger ControlID="rblUVerseInternet" EventName="SelectedIndexChanged" />
                                                    </Triggers>
                                                </asp:UpdatePanel>

    </code>

    The ScriptManager on the page is set up as follows:

    <code>

    <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"

    AsyncPostBackTimeout="1800">

    </asp:ScriptManager>

     

    </code>

    Here is the content of my web.config file:

    <code>

    <?xml version="1.0"?>

    <configuration>

    <configSections>

    <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

    <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

    <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>

    <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">

    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>

    <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>

    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>

    <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/></sectionGroup></sectionGroup></sectionGroup></configSections><appSettings configSource="configs\local\appSettings.config"></appSettings>

    <connectionStrings configSource="configs\local\connectionStrings.config"></connectionStrings>

    <system.web>

    <customErrors mode="Off"/>

    <!--

    Set compilation debug="true" to insert debugging

    symbols into the compiled page. Because this

    affects performance, set this value to true only

    during development.

    -->

    <compilation debug="true">

    <codeSubDirectories>

    <add directoryName="vb_code"/>

    <add directoryName="cs_code"/>

    </codeSubDirectories>

    <assemblies>

    <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

    <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

    <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

    <add assembly="System.Data.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

    <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>

    <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>

    <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></assemblies></compilation>

    <httpHandlers>

    <add path="DynamicScript.axd" verb="*" type="Tracking.DynamicScriptMgr, Tracking"></add>

    <remove verb="*" path="*.asmx"/>

    <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

    <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

    <add verb="GET,HEAD" path="ScriptResource.axd" validate="false" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpHandlers>

    <httpModules>

    <add name="GlobalMod" type="HomesCommonClasses.GlobalMod,HomesCommonClasses"/>

    <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></httpModules>

    <pages>

    <controls>

    <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

    <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></controls></pages></system.web>

    <system.webServer>

    <validation validateIntegratedModeConfiguration="false"/>

    <modules>

    <remove name="ScriptModule"/>

    <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/></modules>

    <handlers>

    <remove name="WebServiceHandlerFactory-Integrated"/>

    <remove name="ScriptHandlerFactory"/>

    <remove name="ScriptHandlerFactoryAppServices"/>

    <remove name="ScriptResource"/>

    <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

    <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

    <add name="ScriptResource" verb="GET,HEAD" path="ScriptResource.axd" preCondition="integratedMode" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>

    <add name="TrackingScriptingResource" path="DynamicScript.axd" verb="*" type="Tracking.DynamicScriptMgr, Tracking"></add>

    </handlers></system.webServer>

    <system.diagnostics>

    <sources>

    <source name="System.ServiceModel" switchValue="Information,ActivityTracing" propagateActivity="true">

    <listeners>

    <add type="System.Diagnostics.DefaultTraceListener" name="Default">

    <filter type=""/>

    </add>

    <!--<add initializeData="C:\Temp\BuyATTclientServiceSearchTracesProd.svclog" type="System.Diagnostics.XmlWriterTraceListener" name="traceListener" traceOutputOptions="None">-->

    <add initializeData="C:\Temp\BuyATTclientServiceSearchTraces.svclog" type="System.Diagnostics.XmlWriterTraceListener" name="traceListener" traceOutputOptions="None">

    <filter type=""/>

    </add>

    </listeners>

    </source>

    <source name="System.ServiceModel.MessageLogging">

    <listeners>

    <!--<add name="messages" type="System.Diagnostics.XmlWriterTraceListener" initializeData="C:\Temp\BuyATTclientMessagesProd.svclog"/>-->

    <add name="messages" type="System.Diagnostics.XmlWriterTraceListener" initializeData="C:\Temp\BuyATTclientMessages.svclog"/>

    </listeners>

    </source>

    </sources>

    </system.diagnostics>

    <system.codedom>

    <compilers>

    <compiler language="c#;cs;csharp" extension=".cs" type="Microsoft.CSharp.CSharpCodeProvider,System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">

    <providerOption name="CompilerVersion" value="v3.5"/>

    <providerOption name="WarnAsError" value="false"/></compiler>

    <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" warningLevel="4">

    <providerOption name="CompilerVersion" value="v3.5"/>

    <providerOption name="OptionInfer" value="true"/>

    <providerOption name="WarnAsError" value="false"/></compiler></compilers></system.codedom>

    <runtime>

    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">

    <dependentAssembly>

    <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>

    <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/></dependentAssembly>

    <dependentAssembly>

    <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>

    <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/></dependentAssembly></assemblyBinding></runtime></configuration>

     </code>

    I really need help in determining why my local website works fine, but doesn't on the TEST web server?

    Please help!!!

    Thanks,

    Bill Yeager MCP.Net, BCIP
  • Re: Sys.WebForms.PageRequestManagerParserErrorException:

    10-09-2008, 2:25 PM
    • Participant
      1,733 point Participant
    • wsyeager
    • Member since 06-26-2002, 7:42 PM
    • Weston, Florida, USA
    • Posts 456

    I found out that this was totally my error and had nothing to do with the framework....

    It was an httpmodule issue that I had in my web.config file that didn't belong there....

    Thanks,

    Bill Yeager MCP.Net, BCIP
  • Re: Sys.WebForms.PageRequestManagerParserErrorException:

    03-11-2009, 2:16 PM
    • Member
      2 point Member
    • insense
    • Member since 03-11-2009, 6:01 PM
    • Posts 1

    Hi Bill,

    I have an error like this, you wrote that was your error, but i'm interested to know how did you fix it

    Everything works on my local machine,

    But when I upload it to a TEST web server, I am getting an error. 

     Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes of this error are when the response is modified by calls to Response.Write(),response filters,HttpModules, or server trace is enabled.
    Details: Error parsing near '    |<html>
    <head>
    '.

    i hope you can help me

    thanks

     

  • Re: Sys.WebForms.PageRequestManagerParserErrorException:

    04-03-2009, 5:13 AM
    • Member
      96 point Member
    • srankamal
    • Member since 02-04-2009, 6:49 AM
    • Posts 219

    hello all i am also facing same error ;and i didt use response.write() in my whole application;please suggest me something to avoid this error

    error sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.
    Mark as an answer if it helps
Page 1 of 1 (9 items)