Share via


How to fix a Sys.WebForms.PageRequestManagerParserError in page with UpdatePanel?

Question

Wednesday, November 15, 2006 6:58 PM

Hi all,

I've got an ASP 2.0 web project using a Master page containing a  ScriptManager tag and  a Default page with a ScriptManagerProxy tag.

The Default page contains

    <asp:ScriptManagerProxy ID="ScriptManagerProxy1" runat="server">
    </asp:ScriptManagerProxy>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
    <asp:MultiView ID="MultiView1" runat="server" ActiveViewIndex="0">

      Two repeaters and their object datasources  in two seperate views

    </asp:MultiView>
    </ContentTemplate>
   </asp:UpdatePanel>

The repeaters just contain links to other pages.Without the UpdatePanel, clicking on any link correctly goes to the desired page. With the UpdatePanel, when I click on any link in either repeater, I get the same error, to wit:

Sys.WebForms.PageRequestManagerParser Error Exception:

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.

Details: Error parsing near '<!DOCTYPE html P'

The detail refered to is the <!DOCTYPE line in the Master file. I have not coded a Response.Write() anywhere in the project. I don't know what response filters are, and as far as I know, server trace is not enabled.

I really need a clue about how to fix this. Any suggestions will be greatly appreciated. 

 

 

All replies (35)

Thursday, February 15, 2007 4:42 AM ✅Answered

I solved the problem (actually I found a workaround)... set EnableEventValidation="false" on the page


Thursday, November 16, 2006 11:25 AM

I too am receiving this type of error. It started occuring after upgrading to the latest ajax. It occurs on a page where I'm using a calendar popupcontrolextender. I'm debugging it right now, and will let you know if I find it. Any info on what causes this would be helpful.


Thursday, November 16, 2006 11:28 AM

OK, well I know what's causing it now - but not why.

1    <script type="text/javascript">
2    <!--
3    function WebForm_OnSubmit() {
4    if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) return false;
5    return true;
6    }
7    // -->
8    </script>
9    
10            <script type="text/javascript">
11   //<![CDATA[
12   Sys.WebForms.PageRequestManager._initialize('ScriptManager1', document.getElementById('form1'));
13   Sys.WebForms.PageRequestManager.getInstance()._updateControls(['tUpdatePanel1'], [], [], 90);
14   
15   //]]>
16   </script>
17   
18   
19            <div id="UpdatePanel1">

 

You can see very clearly on line 13 that "UpdatePanel1" is getting changed to "tUpdatePanel1". Thats the only thing I can figure to this point.

 


Thursday, November 16, 2006 11:36 AM

I am having the sam error! And I tried to post about it on the forum but my post was rejected 7 times!!!!!! The error is caused by asp:repeater and timer in my case! Every time timer doesnt finish its tick the error shows!!!


Thursday, November 16, 2006 11:48 AM

Here is what else i know:

a) Error occures sometimes when session drops

b) Error occurrs only in asp:repeater and asp:datalist control

c) Error occurrs when timer is used with async updateing


Thursday, November 16, 2006 11:55 AM

MORE STUFF:

error : http://img365.imageshack.us/img365/664/errorzu2.gif

I haven't modified any Response.Write, haven't used even response.write! I have a chat window that uses timer control to partialy refresh each 2 seconds and it seems when i hit some link in the same time that panel needs to refresh the exception is thrown, also the exception is thrown when uploading an image trough file upload control that is NOT in updatepanel (since other way doesn't work). In stack trace there has been no modifications to Response object!

 If there is no way to remove this error is there any way to supress the ALERT box? I tried to use the error handler as suggested in ajax doc but it doesn't seem to work! And also script is continualy returning this error:

Error: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.status]"  nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)"  location: "JS frame :: http://www.xportal.hr/ScriptResource.axd?d=xi4g_xLxn3B70wbZCfeWnKMiW_E0FyGwKEdZIUFhwf7gKB2LI60tYO-EM_0TDQDlwIA4onOBmd-u0xa6uQ6zmTuRMpBiYRiTtkvlSEcH6FPVRILQ4E-9i8fZINfSxy9Ju4O8Fa3iJSnKonuguc4j3A2&t=632985421119843750 :: anonymous :: line 5"  data: no]
Source File: http://www.xportal.hr/ScriptResource.axd?d=xi4g_xLxn3B70wbZCfeWnKMiW_E0FyGwKEdZIUFhwf7gKB2LI60tYO-EM_0TDQDlwIA4onOBmd-u0xa6uQ6zmTuRMpBiYRiTtkvlSEcH6FPVRILQ4E-9i8fZINfSxy9Ju4O8Fa3iJSnKonuguc4j3A2&t=632985421119843750
Line: 5


Thursday, November 16, 2006 11:58 AM

Just for good measure, here's the page that is producing this error.

 

1    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="RefPhysician.aspx.cs" Inherits="Forms_RefPhysician" %>
2    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3    <html xmlns="http://www.w3.org/1999/xhtml">
4    <head runat="server">
5       <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
6       <title>OU Physicians Intranet</title>
7       <link href="/c/HeaderFooter.css" rel="stylesheet" type="text/css" />
8    </head>
9    <body>
10      <%--NAVIGATION BEGIN--%>
11      <!--#include file="/inc/NavLinks.htm"-->
12      <div id="container">
13         <%-CONTENT BEGIN%>
14         <form id="form1" runat="server">
15            <asp:ScriptManager ID="ScriptManager1" runat="server" />
16            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
17               <ContentTemplate>
18                  
19                  <asp:Panel ID="pnlHiddenCalendar" runat="server" Style="display: none">
20                  <ajaxToolkit:PopupControlExtender ID="pceCalendar" runat="server" TargetControlID="txtDateRequested" PopupControlID="pnlHiddenCalendar" Position="Bottom" />
21                     <asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="#999999"
22                        CellPadding="0" DayNameFormat="FirstTwoLetters" Font-Names="Verdana" Font-Size="8pt"
23                        ForeColor="Black" Height="125px" Width="125px" TitleFormat="Month" OnSelectionChanged="Calendar1_SelectionChanged">
24                        <SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
25                        <TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
26                        <SelectorStyle BackColor="#CCCCCC" />
27                        <WeekendDayStyle BackColor="#7B0404" ForeColor="White" />
28                        <OtherMonthDayStyle ForeColor="Gray" />
29                        <NextPrevStyle VerticalAlign="Bottom" />
30                        <DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
31                        <TitleStyle BackColor="#999999" BorderColor="Black" Font-Bold="True" />
32                     </asp:Calendar>
33                  </asp:Panel>
34                  <table>
35                     <tr id="Requestor">
36                        <td>
37                           <p>
38                              Contact Name:
39                              <asp:TextBox ID="txtContactName" CssClass="smalltext" runat="server" Width="200" /><asp:RequiredFieldValidator
40                                 ID="rfValidator1" ControlToValidate="txtContactName" ErrorMessage="Contact Name Required"
41                                 runat="server">*</asp:RequiredFieldValidator>
42                           </p>
43   
44                        </td>
45                        <td>
46                           <p>
47                              Date Requested By: <asp:TextBox ID="txtDateRequested" CssClass="smalltext" OnInit="txtDateRequested_Init" runat="server" Width="75" />
48                           </p>
49                        </td>
50                     </tr>
51                  </table>
52               </ContentTemplate>
53            </asp:UpdatePanel>
54         </form>
55         <%-CONTENT END%>
56      </div>
57      <%--BEGIN FOOTER--%>
58      <!--#include file="/inc/footer.htm"-->
59   </body>
60   </html>

  And here is the codebeind relevant to this discussion.

  

1       protected void txtDateRequested_Init(object s, EventArgs e)
2       {
3          txtDateRequested.Text = DateTime.Today.AddDays(1).ToShortDateString();
4       }
5       protected void Calendar1_SelectionChanged(object sender, EventArgs e)
6       {
7          pceCalendar.Commit(Calendar1.SelectedDate.ToShortDateString());
8       }

 
 


Thursday, November 16, 2006 12:20 PM

<%@ Control Language="VB" ClassName="chat" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SQLClient" %>
<%@ Import Namespace="System.Data.SqlTypes" %>
 
<script runat="server">
    Dim cc As New core
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
        If cc.CookieValue(Request, "user", "mail") <> "" And pan1.Visible = True Then
            pan2.Visible = True
            pan1.Visible = False
        ElseIf cc.CookieValue(Request, "user", "mail") = "" And pan2.Visible = True Then
            pan1.Visible = True
            pan2.Visible = False
        End If
        If Not IsPostBack Then
            FillRep(rep1, "exec GetChat", 0, 0)
        End If
    End Sub
   
    Sub FillRep(ByVal repet As Repeater, ByVal SqlString As String, ByVal intKat As Long, ByVal intPodkat As Long)
        Dim scr As New DataSet
        Dim key As String

        key = "chatbox " & "-" & intKat & "-" & intPodkat & "-" & core.X_MIN
        scr = Cache(key)

        If scr Is Nothing Then

            Dim rs As New DataSet
            Dim conn As New SqlConnection(ConfigurationManager.AppSettings("xportal_dsn"))
            Dim myCommand As New SqlDataAdapter(SqlString, conn)
            conn.Open()
            myCommand.Fill(rs)

            scr = rs

            rs = Nothing

            myCommand = Nothing
            conn.Close()
            conn = Nothing

            Cache.Insert(key, scr, Nothing, DateTime.Now.AddSeconds(1), TimeSpan.Zero)
        End If

        repet.DataSource = scr
        repet.DataBind()
        scr = Nothing

    End Sub

    Protected Sub timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs)
        FillRep(rep1, "exec GetChat", 0, 0)
    End Sub
   
    Protected Sub subm_Click(ByVal sender As Object, ByVal e As System.EventArgs)
        If txtUpis.Text <> "" Then
            cc.PostSql_NoReturn("exec AddChat '" + cc.CookieValue(Request, "user", "mail") + "','" + txtUpis.Text + "'")
            txtUpis.Text = ""
        End If

        If cc.CookieValue(Request, "user", "mail") = "" Then Response.Redirect("default.aspx")
        FillRep(rep1, "exec GetChat", 0, 0)
        upd2.Update()
    End Sub
   
</script>
<asp:Timer Enabled="true" Interval="3000" runat="server" ID="timer1" OnTick="timer1_Tick" />

<table width="170" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td colspan="3"><img src="kucice/chat-top.gif" width="170" height="14"></td>
              </tr>
              <tr>
                <td width="4"><img src="osnovni/1px-siva2.gif" width="4" height="518"></td>
                <td background="kucice/chat-pozadina.gif" valign="top" align="center"><table width="150" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td class="kucica1">chat:</td>
                    <td align="right"><img src="kucice/chat.gif" width="32" height="21"> </td>
                  </tr>
                </table>
                </td>
              </tr>
<asp:Panel ID="pan1" runat="server" >
              <tr>
                <td height="15" class="kucica2">(<img src="osnovni/1px-proziran.gif" width="1" height="15">registriraj
                  se za chat) </td>
              </tr>
</asp:Panel>
<asp:Panel ID="pan2" runat="server">
              <tr>
                <td height="30" valign="bottom"><label>
<asp:UpdatePanel ID="UpdatePanel21" runat="server" UpdateMode="conditional" ChildrenAsTriggers="true">

<ContentTemplate>
<fieldset style="padding:0px;margin:0px;border:0px;">               
                <asp:TextBox ID="txtUpis" TextMode="SingleLine" Width="100px" CssClass="kucicaupis1" runat="server" /> <asp:button UseSubmitBehavior="true" ID="subm" Text="Pošalji" CssClass="button" runat="server" OnClick="subm_Click" />
 </fieldset>
</ContentTemplate>
</asp:UpdatePanel>

                </label></td>
              </tr>
</asp:Panel>
             
              <tr>
                <td height="15"><img src="osnovni/1px-proziran.gif" width="1" height="15"></td>
              </tr>
              <tr>
                <td class="kucica2">
<asp:UpdatePanel ID="upd2" runat="server" UpdateMode="conditional" ChildrenAsTriggers="true">
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="timer1" />
            <asp:AsyncPostBackTrigger ControlID="subm" />
        </Triggers>
<ContentTemplate>
<fieldset style="padding:0px;margin:0px;border:0px;">
<div style="overflow:hidden;height:440px;">
                <asp:Repeater ID="rep1" runat="server" >
                  <ItemTemplate>
                    <strong><%#DataBinder.Eval(Container.DataItem, "nick")%>:</strong> <%#DataBinder.Eval(Container.DataItem, "tekst")%><br>
                  </ItemTemplate>
                  </asp:Repeater>
</div>
</fieldset>
</ContentTemplate>
</asp:UpdatePanel>
                  </td>
              </tr>
            </table>
            </td>
                <td width="4"><img src="osnovni/1px-siva2.gif" width="4" height="518"></td>
              </tr>
              <tr>
                <td colspan="3"><img src="kucice/chat-bottom.gif" width="170" height="14"></td>
              </tr>
            </table>
            <img src="osnovni/1px-proziran.gif" width="170" height="25"><br>
           
This is my control on wich the error occures!!!!


Thursday, November 16, 2006 12:21 PM

Make sure you don't override Render in Page. This was how I got the exception. (This must be a bug).

I used RegisterScriptBlock, but it's not acceptable though. I was just in luck.

I override Render to write out an HTML comment containing keys that are not translated for debugging (There is no other way to do it in my case since it has to be accumulated across MANY postbacks).


Thursday, November 16, 2006 12:36 PM

Yes but most of us are not overriding Render in page and still getting the error. Is asp:Repeater overriding render or affecting directly Response object?


Thursday, November 16, 2006 12:39 PM

Is there any way to hide the ALERT box????


Thursday, November 16, 2006 1:42 PM

This just has to be a bug. I'm producing some interesting behavior trying to trace this down. If i put the PCE outside the update panel everything works fine, but only once. I.E. the popup happens, and I can select the calendar, but once I have done it once its over.

 Very strange.
 


Friday, November 17, 2006 5:57 AM

Can't anyone fix this? Or at least tell me how to remove alert box that happens on error?


Friday, November 17, 2006 2:30 PM

Ditto on this error, created a new page in ajax site template and the same error comes up for me


Friday, November 17, 2006 4:45 PM

I spent 1.5 days trying to fix this to no success. I ended up uninstalling and going back to the July CTP. C'mon guys, if you're going to release a beta...make it better than the CTP.

Naturally beta's can be buggy, but this is just ridiculous. 


Friday, November 17, 2006 4:51 PM

hello. 

Can't anyone fix this? Or at least tell me how to remove alert box that happens on error?

i'll take a look at this if you send me a demo with a simple page + database that reproduces the problem. it must be a simple page.

btw, you can see how to handle errors in these posts:

http://msmvps.com/blogs/luisabreu/archive/2006/10/29/UpdatePanel_3A00\_-having-fun-with-errors.aspx

http://msmvps.com/blogs/luisabreu/archive/2006/10/31/Handling-errors-globally.aspx

 


Saturday, November 18, 2006 11:46 AM

I have sent you a simple page (control) that creates the problem in previous reply-s. Just create asp:repeater and asynchronously (by timer trigger) bind it to custom dataset that gets data from sql server 2000 and customly caches for every 2-3 seconds...

 Btw thanks for the error handlings...
 


Saturday, November 18, 2006 12:13 PM

hello.

hum...haven't received it yet...did you send it to gmail?

 


Saturday, November 18, 2006 12:19 PM

Imports system.Data

Imports System.Data.SQLClient

Imports System.Data.SqlTypes

Partial Class _chat

Inherits System.Web.UI.Page

Dim cc As New core

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

If Not IsPostBack Then

If cc.CheckPass(cc.CookieValue(Request, "user", "mail"), cc.CookieValue(Request, "user", "pass")) = True And pan1.Visible = True Then

pan2.Visible = True

pan1.Visible = False

ElseIf cc.CheckPass(cc.CookieValue(Request, "user", "mail"), cc.CookieValue(Request, "user", "pass")) = False And pan2.Visible = True Then

pan1.Visible = True

pan2.Visible = False

End If

FillRep(rep1, "exec GetChat", 0, 0)

End If

End Sub

Sub FillRep(ByVal repet As Repeater, ByVal SqlString As String, ByVal intKat As Long, ByVal intPodkat As Long)

Dim scr As New DataSet

Dim key As String

key = "chatbox " & "-" & intKat & "-" & intPodkat & "-" & core.X_MIN

scr = Cache(key)

If scr Is Nothing Then

Dim rs As New DataSet

Dim conn As New SqlConnection(ConfigurationManager.AppSettings("xportal_dsn"))

Dim myCommand As New SqlDataAdapter(SqlString, conn)

conn.Open()

myCommand.Fill(rs)

scr = rs

 

rs = Nothing

myCommand = Nothing

conn.Close()

conn = Nothing

Cache.Insert(key, scr, Nothing, DateTime.Now.AddSeconds(1), TimeSpan.Zero)

End If

repet.DataSource = scr

repet.DataBind()

scr = Nothing

End Sub

Protected Sub timer1_Tick(ByVal sender As Object, ByVal e As System.EventArgs)

FillRep(rep1, "exec GetChat", 0, 0)

End Sub

Protected Sub subm_Click(ByVal sender As Object, ByVal e As System.EventArgs)

If txtUpis.Text <> "" Then

cc.PostSql_NoReturn("exec AddChat '" + cc.CookieValue(Request, "user", "mail") + "','" + txtUpis.Text + "'")

txtUpis.Text = ""

End If

If cc.CookieValue(Request, "user", "pass") = "" Then Response.Redirect("default.aspx")

FillRep(rep1, "exec GetChat", 0, 0)

upd2.Update()

End Sub

Protected Sub ScriptManager1_AsyncPostBackError(ByVal sender As Object, ByVal e As Microsoft.Web.UI.AsyncPostBackErrorEventArgs) Handles ScriptManager1.AsyncPostBackError

If (e.Exception.Data("ExtraInfo") <> Nothing) Then

ScriptManager1.AsyncPostBackErrorMessage = _

e.Exception.Message & _

e.Exception.Data("ExtraInfo").ToString()

Else

ScriptManager1.AsyncPostBackErrorMessage = _

"Click ok!"

End If

End Sub

End Class

 

 

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="_chat.aspx.vb" Inherits="_chat" %>

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">

<title>Chat</title>

<link href="xportal2.css" rel="stylesheet" type="text/css">

<style>

A {

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 12px;

color: #222222;

text-decoration: none;

}

A:hover {

font-family: Verdana, Arial, Helvetica, sans-serif;

font-size: 12px;

color: #222222;

text-decoration: none;

}

</style>

</head>

<body style="margin: 0px;">

<form id="form1" runat="server">

<asp:ScriptManager ID="ScriptManager1" runat="server" />

<asp:Timer Enabled="true" Interval="3000" runat="server" ID="timer1" OnTick="timer1_Tick" />

<script type="text/javascript" language="javascript">

var divElem = 'AlertDiv';

var messageElem = 'AlertMessage';

var bodyTag = 'bodytag';

Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);

function EndRequestHandler(sender, e)

{

if (e.get_error() != undefined)

{

var errorMessage;

if (e.get_response().get_statusCode() == '200')

{

errorMessage = e.get_error().message;

}

else

{

// Error occurred somewhere other than the server page.

errorMessage = 'An unspecified error occurred. ';

}

e.set_errorHandled(true);

}

}

</script>

<table width="170" border="0" cellspacing="0" cellpadding="0" style="text-align:left;">

<tr>

<td colspan="3"><img src="kucice/chat-top.gif" width="170" height="14"></td>

</tr>

<tr>

<td style="background-color:#DA6E1D;"><img src="osnovni/1px-siva2.gif" width="4" height="518"></td>

<td background="kucice/chat-pozadina.gif" valign="top" align="center"><table width="150" border="0" cellspacing="0" cellpadding="0">

<tr>

<td><table width="100%" border="0" cellspacing="0" cellpadding="0">

<tr>

<td class="kucica1">chat:</td>

<td align="right"><img src="kucice/chat.gif" width="32" height="21"> </td>

</tr>

</table>

</td>

</tr>

<asp:Panel ID="pan1" runat="server" >

<tr>

<td height="15" class="kucica2">(<img src="osnovni/1px-proziran.gif" width="1" height="15">registriraj

se za chat) </td>

</tr>

</asp:Panel>

<asp:Panel ID="pan2" runat="server">

<tr>

<td height="30" valign="bottom"><label>

<asp:UpdatePanel ID="UpdatePanel21" runat="server" UpdateMode="conditional" ChildrenAsTriggers="true">

<ContentTemplate>

<fieldset style="padding:0px;margin:0px;border:0px;">

<asp:TextBox ID="txtUpis" TextMode="SingleLine" Width="100px" CssClass="kucicaupis1" runat="server" /> <asp:button UseSubmitBehavior="true" ID="subm" Text="Pošalji" CssClass="button" runat="server" OnClick="subm_Click" />

</fieldset>

</ContentTemplate>

</asp:UpdatePanel>

</label></td>

</tr>

</asp:Panel>

 

<tr>

<td height="15"><img src="osnovni/1px-proziran.gif" width="1" height="15"></td>

</tr>

<tr>

<td class="kucica2">

<asp:UpdatePanel ID="upd2" runat="server" UpdateMode="conditional" ChildrenAsTriggers="true">

<Triggers>

<asp:AsyncPostBackTrigger ControlID="timer1" />

<asp:AsyncPostBackTrigger ControlID="subm" />

</Triggers>

<ContentTemplate>

<fieldset style="padding:0px;margin:0px;border:0px;">

<div style="overflow:hidden;height:430px;">

<asp:Repeater ID="rep1" runat="server" >

<ItemTemplate>

<strong><%#DataBinder.Eval(Container.DataItem, "nick")%>:</strong> <%#DataBinder.Eval(Container.DataItem, "tekst")%><br>

</ItemTemplate>

</asp:Repeater>

</div>

 

</fieldset>

</ContentTemplate>

</asp:UpdatePanel>

</td>

</tr>

</table>

</td>

<td width="4"><img src="osnovni/1px-siva2.gif" width="4" height="518"></td>

</tr>

<tr>

<td colspan="3"><img src="kucice/chat-bottom.gif" width="170" height="14"></td>

</tr>

</table>

<img src="osnovni/1px-proziran.gif" width="170" height="25"><br>

 

 

 

</form>

</body>

</html>

 

 


Saturday, November 18, 2006 12:26 PM

Ow bugger... Sorry for tripple posting... and crappy look... Just pasted it from VS.NET 2005 ... Can i send it to you via email?


Saturday, November 18, 2006 1:43 PM

hello again.

well, you'll have to send me a demo project that works so that i can try it in my machine. just build a demo site, with a simple page that reproduces the problem you're having. without it, i won't be able to help you...


Sunday, November 26, 2006 8:23 AM

Hello,

I have a solution for the problem. For me it occures when clicking anythink that performs a postback. The solution can be found in the "Migration Guide for AJAX Application":

You have to merge the web.config file of your project with the one from the installation target. 

(%ProgramFiles%\Microsoft ASP.NET\ASP.NET 2.0 <st1:City w:st="on"><st1:place w:st="on">AJAX</st1:place></st1:City> Extensions\v1.0.61025\Web.config)

 

Regards,

Toni Thenhausen 

 

 


Sunday, November 26, 2006 5:24 PM

hello.

hum, i think that i've taken a look at the code and i've answered the man...didn't i?


Sunday, November 26, 2006 5:44 PM

Hi, sorry to barge in like that but I posted a couple of messages on a different thread for a problem I think is similar, can one of you guys have a look, I am getting desparate for a solution!

 My problem involves getting a "Sys.WebForms.PageRequestManagerParserError" when and only when using an UpdatePanel in page that has been accessed via a "server.transfer".

http://forums.asp.net/thread/1474311.aspx 

 
Thanks

 

 


Monday, July 23, 2007 12:48 AM

hello again.

well, you'll have to send me a demo project that works so that i can try it in my machine. just build a demo site, with a simple page that reproduces the problem you're having. without it, i won't be able to help you...

 

Hi!

I too am getting this error on a page that uses repeaters and timers. However, when using Firefox (the latest - 2.0.0.5), I can reproduce this error on a very simple page containing nothing but a label and a timer which updates the label every x seconds. If you wait for a bit, the error will appear. I've posted a simple website that reproduces the problem on my machine on my blog: http://blog.graffen.dk/2007/07/13/PageRequestManagerParserErrorException+When+Using+Microsoft+NET+AJAX+UpdatePanels.aspx

I'm getting really desperate here. I don't feel like just handling the error and suppressing the error message - I prefer to really get to the root of the problem instead of having to hack my way out of it.

 /Jesper


Wednesday, December 26, 2007 2:26 AM

Hi,

 I was facing the same issue.But my issue was resolved by using the following steps:

1. Set EnableValidation="False" for the Page

2. Remove all the Request.Response, Server.redirect from your Code

This worked for me. If Some body finds concrete solution and answer please let me know

  

 


Thursday, April 17, 2008 3:24 PM

I have no idea what to do now...I have uninstalled the "real' version and have gone back to the CTP and STILL no results.  I get the same error.  It stops on this line of code: Sys.WebForms.PageRequestManager._initialize('ScriptManager1', document.getElementById('form1'));

 

I can run this perfectly fine inside Firefox but run this in IE7 and it give the error message: Microsoft JScript runtime error: 'Sys' is undefined

Reading every single thing that I can on the internet, I still cannot get the solution straight...if anyone could help that would be great!  :)  I have spent DAYS on this and don't want to rewrite the entire site to remove the AJAX stuff.  ALL the AJAX that is in the ENTIRE site are update panels.  Nothing else.  No rounded corner extenders or accordion extenders or....

 

PLEASE HELP!  :(
 


Tuesday, April 22, 2008 2:25 AM

Hi Toni, 

I have copied web.config from instllation target to my local project. Problem is still exist.

Regards
Madhu


Thursday, July 31, 2008 10:54 AM

I was getting this error on a gridview inside of an updatepanel. I'd click my 'edit' button on a row and it would work sometimes, not all of the time.The html source looked like it had rendered to the edit version, but it wouldnt in the browser. And of course i would get the error. (Only in ie, firefox didnt display the error)

I narrowed the problem down to my validation-- i was using a requiredfieldvalidator and a rangevalidator together to validate a textbox.

If both of them had enableclientscript="true", then i'd get an error. If only one of them did, then I wouldn't. So I put one of them on the server. No errors!

 

Micah

 


Thursday, August 28, 2008 1:56 PM

I am getting the same error but only when i am using response.redirect on a button_click that is in the update-panel. when i remove the response.redirect, then i don't get the error.

Is there any alternative to this. I have tried server.transfer but again got the error.

if i put the response.redirect outside the update-panel, then i am fine but that does not achieve the purpose.


Monday, January 19, 2009 1:59 AM

Dear all, I find that I have the same problem as you all descript. I find my problem is that I create a new project, at web.config, It created different web.config that was missing some parameters at web.config. I find that at my old created project, it doesn't have such problem. I copy the old parameters from old web.config to the new project. The problem solved.

my old version one (that's work)

<?xml version="1.0"?>
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/v2.0">
 <configSections>
  <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
   <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
    <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
    <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
     <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="Everywhere"/>
     <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
     <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" requirePermission="false" allowDefinition="MachineToApplication"/>
    </sectionGroup>
   </sectionGroup>
  </sectionGroup>
 </configSections>

 <system.web>
  <trace enabled="true" mostRecent="true" requestLimit="50"/>
  <pages>
   <controls>
    <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    <add namespace="AjaxControlToolkit" assembly="AjaxControlToolkit" tagPrefix="ajaxToolkit"/>
   </controls>
  </pages>
  <!--
          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" defaultLanguage="c#">
   <assemblies>
    <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
    <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="CrystalDecisions.Web, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.Shared, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.ReportSource, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.Enterprise.Framework, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.Enterprise.Desktop.Report, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.ReportAppServer.Controllers, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.CrystalReports.Engine, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.Enterprise.InfoStore, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.Enterprise.Viewing.ReportSource, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692FBEA5521E1304"/>
    <add assembly="CrystalDecisions.ReportAppServer.ClientDoc, Version=11.5.3300.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
    <add assembly="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/>
    <add assembly="System.Configuration, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.Web.Services, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.DirectoryServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.DirectoryServices.Protocols, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.EnterpriseServices, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.ServiceProcess, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.Web.RegularExpressions, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
   </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"/>
   <add verb="GET" path="CrystalImageHandler.aspx" type="CrystalDecisions.Web.CrystalImageHandler, CrystalDecisions.Web, Version=11.5.3700.0, Culture=neutral, PublicKeyToken=692fbea5521e1304"/>
  </httpHandlers>
  <httpModules>
   <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
  </httpModules>
  <!--  GLOBALIZATION
          This section sets the globalization settings of the application.
    -->
  <globalization culture="zh-HK" uiCulture="zh-HK"/>
 </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>
 <location allowOverride="true" inheritInChildApplications="true">
  <appSettings>
   <add key="CrystalImageCleaner-AutoStart" value="true" />
   <add key="CrystalImageCleaner-Sleep" value="60000" />
   <add key="CrystalImageCleaner-Age" value="120000" />
  </appSettings>
 </location>
</configuration>

My new project (didn't work)

<?xml version="1.0"?>
<!--
    Note: As an alternative to hand editing this file you can use the
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in
    machine.config.comments usually located in
    \Windows\Microsoft.Net\Framework\v2.x\Config
-->
<configuration>
 <appSettings/>
 <connectionStrings/>
 <system.web>
  <!--
            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">
   <assemblies>
    <add assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.Web.Extensions.Design, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
    <add assembly="System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
    <add assembly="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/></assemblies></compilation>
  <!--
            The <authentication> section enables configuration
            of the security authentication mode used by
            ASP.NET to identify an incoming user.
        -->
  <authentication mode="Windows"/>
  <!--
            The <customErrors> section enables configuration
            of what to do if/when an unhandled error occurs
            during the execution of a request. Specifically,
            it enables developers to configure html error pages
            to be displayed in place of a error stack trace.

        <customErrors mode="RemoteOnly" defaultRedirect="GenericErrorPage.htm">
            <error statusCode="403" redirect="NoAccess.htm" />
            <error statusCode="404" redirect="FileNotFound.htm" />
        </customErrors>
        -->
  <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="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
   <add verb="GET" path="ScriptResource.axd" type="Microsoft.Web.Handlers.ScriptResourceHandler" validate="false"/>
  </httpHandlers>
 </system.web>
</configuration>

[email protected]

 


Wednesday, March 18, 2009 7:56 AM

i have found the Error here.

I was also facing the same error. and when i replace my new webconfig file, then i saw that i was using  sessionState=StateServer which is causing this error...

can any one tell me if i use inProc then session crashes after response.redirect. i don't know what to do..

please help.

thanks.


Tuesday, August 4, 2009 9:29 AM

LOrd,

Have you found any solution yet???

PLs let me know..


Tuesday, August 4, 2009 9:49 AM

Hi All,

Please help me to resolve this issue.

Basically our requirement is  to combine webresource.axd and scriptresource.axd files.

 

As you know when we use asp.net ajax and ajaxtoolkit in the application by default , some of the javascript files(webresource.axd and scriptresource.axd) will load automatically.

 

For loading all the JavaScript files browser will take multiple requests, To reduce the multiple requests we are trying  to combine all the scripts into one file and loading into the client side.

 

We have tried to resolve using custom httpmodule and httphandlers but they are still putting us in loops.  We just wanted to knock people to understand if they had used a different method, we could get some help.

 

We want to do everything using asp.net 2.0

 

thanks

 


Tuesday, August 4, 2009 12:12 PM

The Problem solved!

It was because I call a dll to update the changes I make in the Grid, ANd in that DLL, I'm creating a XML file dynamically, whose location was not accesible by the web server. Now, I have changed the file as an object in Release mode.

 

Thanks for all.