PageRequestManagerParserErrorException

17 posts, 1 answers
  1. Jose Granja
    Jose Granja avatar
    84 posts
    Member since:
    Oct 2009

    Posted 23 Feb 2011 Link to this post

    Hi,

    I just updated from MVC1 to MVC2 and all ajax request where working fine and now I get this exception:

    Uncaught Sys.WebForms.PageRequestManagerParserErrorException: 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.
     
    Details: Error parsing near '
     
     
     
    <!DOCTYPE html P'.

    I've read that there is a bug with the Role Provider but I disabled it and it's still happening... very odd that from working I have now trouble in every component that uses this.

    any ideas/thoughts? 

    thank you 

    regards,

    jose
  2. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 25 Feb 2011 Link to this post

    Hello Jose,

    Can you try using ASP:UpdatePanel instead of RadAjax in your scenario? Let me know if the problem persists.

    All the best,
    Iana
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. Jose Granja
    Jose Granja avatar
    84 posts
    Member since:
    Oct 2009

    Posted 28 Feb 2011 Link to this post

    Hi, 

    thank you for the help! I'm getting the exact same error with UpdatePanel :S Is this a web.config problem? Did I forget to include anything? This happened after I updated from MVC 1 to MVC 2 ! I was long time planing the migration and after this the RadAjax stopped working! Any ideas? Thank you very much

    regards,

    jose
  4. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 28 Feb 2011 Link to this post

    Hi Jose,

    It seems that there is some incompatibility with the MS AJAX Framework and MVC2. I suggest that you check that in the public forums and find a resolution there. Once the page works with ASP:UpdatePanel, it will work with RadAjax as well.

    Best wishes,
    Iana
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  5. Robbie Hughes
    Robbie Hughes avatar
    29 posts
    Member since:
    Jul 2009

    Posted 28 Feb 2011 Link to this post

    Do I need to update the javascript files :

    MicrosoftAjax.js
    MicrosoftMvcAjax.js

    ?

    I haven't done that.. they're still the same that I used for MVC1
  6. Jose Granja
    Jose Granja avatar
    84 posts
    Member since:
    Oct 2009

    Posted 28 Feb 2011 Link to this post

    sorry I replied from the other account.

    regards,

    jose
  7. Jose Granja
    Jose Granja avatar
    84 posts
    Member since:
    Oct 2009

    Posted 28 Feb 2011 Link to this post

    I changed the files and it's still happening... is it then worth moving to MVC3? Are all the telerik components suported?
  8. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 01 Mar 2011 Link to this post

    Hello Jose,

    Basically, if you can run asp.net page, with ASP:ScriptManager and ASP:UpdatePanel in it for instance, under MVC3, you should be able to use our RadControls for ASP.NET AJAX as well. However I would suggest that you try our extensions provided especially for MVC. Find more information about them in the below resources:
    http://demos.telerik.com/aspnet-mvc
    http://www.telerik.com/products/aspnet-mvc.aspx

    All the best,
    Iana
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  9. Jose Granja
    Jose Granja avatar
    84 posts
    Member since:
    Oct 2009

    Posted 01 Mar 2011 Link to this post

    Ok thank you very much! But you have any idea how to fix the incompatibility from MS AJAX Framework and MVC2 ? I would rather stay with MVC2 from a while and then change! I don't want to rush and move to MVC3 right now! I've read a lot of forums but all sugest the Response.Write error which is not my case.

    regards,

    jose
  10. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 01 Mar 2011 Link to this post

    Hello Jose,

    I am afraid that the issue is a bit out of our scope.
    However I would suggest that you make a simple asp.net page with ASP:UpdatePanel and some controls making ajax, for instance a button which updates a label text. Then make sure this scenario can be integrated in MVC2. If this works fine, then you can try adding one by one the functionalities of your current scenario and thus see what is causing the issue.

    Kind regards,
    Iana
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  11. Jose Granja
    Jose Granja avatar
    84 posts
    Member since:
    Oct 2009

    Posted 02 Mar 2011 Link to this post

    HI,

    as you told me I've tried starting a new project only the essential things and see if it works! To my surprise it is not working event in that scenario... what else can I do? I'm working with MVC.net 2 , .net framework 3.5 SP 1 and IIS 7.5 ! What could be wrong there? I've been looking for a lot of time and I need a suggestion before I go mad.

    my request looks like this:

    Request URL:http://localhost:51645/
    Request Method:POST
    Status Code:200 OK
    Request Headers
    Accept:*/*
    Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
    Accept-Encoding:gzip,deflate,sdch
    Accept-Language:en-GB,en-US;q=0.8,en;q=0.6
    Cache-Control:no-cache
    Connection:keep-alive
    Content-Length:378
    Content-Type:application/x-www-form-urlencoded; charset=UTF-8
    Cookie:ASP.NET_SessionId=ac5tzd550f2mv55554kwi53d; .ASPXAUTH=C9D51D24DE8CB74EF9CF5CDC387DC683BBD13C35DC7DC6EB6C02E4709A5C9E5A32D3B6BD6E74EFCDA43ED2EE59378BED08FBE42F78704FAB70BF7A78A1D09747113E438F0BFF922B467BF71B71FF18182547426D39DC7CFDC39775FAD93187DECBB2095728207DCB089FFF0DDC6A5A9380E9FD4C; CentralLoginCookie=
    Host:localhost:51645
    Origin:http://localhost:51645
    Referer:http://localhost:51645/
    User-Agent:Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.107 Safari/534.13
    X-MicrosoftAjax:Delta=true
    X-Requested-With:XMLHttpRequest
    Form Data
    ctl00%24MainContent%24scriptMgr:ctl00$MainContent$updatePnl|ctl00$MainContent$Button1
    __EVENTTARGET:
    __EVENTARGUMENT:
    __VIEWSTATE:/wEPDwUKLTk3MjQyNzY3MGRkSl6zGDV6Bpf/OGhwjLsVIfm3CoH1/tcZivv5l5K9J5U=
    __EVENTVALIDATION:/wEWAgK9m4i1AQLT8MqYCCO/qWUw0w0DfM1bUrvSm6Ryf02ehuLwPm0nl lGq8bq
    __ASYNCPOST:true
    ctl00%24MainContent%24Button1:Generate random names
    Response Headers
    Cache-Control:private
    Connection:Close
    Content-Length:4089
    Content-Type:text/html; charset=utf-8
    Date:Wed, 02 Mar 2011 17:13:35 GMT
    Server:ASP.NET Development Server/10.0.0.0
    X-AspNet-Version:4.0.30319
    X-AspNetMvc-Version:2.0


    thank you very much

    regards,

    jose
  12. Jose Granja
    Jose Granja avatar
    84 posts
    Member since:
    Oct 2009

    Posted 02 Mar 2011 Link to this post

    The only thing I find odd is that is sending:

    X-AspNet-Version:4.0.30319

    Shouldn't it be 3.5? 

    regards,

    jose
  13. Jose Granja
    Jose Granja avatar
    84 posts
    Member since:
    Oct 2009

    Posted 02 Mar 2011 Link to this post

    Sorry that was my mistake... for the test project I selected framework 4.0 instead of 3.5.

    Here is the response using framework 3.5

    Request URL:http://localhost:51877/
    Request Method:POST
    Status Code:200 OK
    Request Headers
    Accept:*/*
    Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.3
    Accept-Encoding:gzip,deflate,sdch
    Accept-Language:en-GB,en-US;q=0.8,en;q=0.6
    Cache-Control:no-cache
    Connection:keep-alive
    Content-Length:342
    Content-Type:application/x-www-form-urlencoded; charset=UTF-8
    Cookie:ASP.NET_SessionId=ac5tzd550f2mv55554kwi53d; .ASPXAUTH=C9D51D24DE8CB74EF9CF5CDC387DC683BBD13C35DC7DC6EB6C02E4709A5C9E5A32D3B6BD6E74EFCDA43ED2EE59378BED08FBE42F78704FAB70BF7A78A1D09747113E438F0BFF922B467BF71B71FF18182547426D39DC7CFDC39775FAD93187DECBB2095728207DCB089FFF0DDC6A5A9380E9FD4C; CentralLoginCookie=
    Host:localhost:51877
    Origin:http://localhost:51877
    Referer:http://localhost:51877/
    User-Agent:Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.107 Safari/534.13
    X-MicrosoftAjax:Delta=true
    Form Data
    ctl00%24MainContent%24scriptMgr:ctl00$MainContent$updatePnl|ctl00$MainContent$Button1
    __EVENTTARGET:
    __EVENTARGUMENT:
    __VIEWSTATE:/wEPDwUKLTk3MjQyNzY3MGRkSWY3CWLb8ZN7eMZvtQkO6IwPCN0=
    __EVENTVALIDATION:/wEWAgLgw7e/DQLT8MqYCNKc4LyTQ3131JaBZR suC8UBa6k
    __ASYNCPOST:true
    ctl00%24MainContent%24Button1:Generate random names
    Response Headers
    Cache-Control:private
    Connection:Close
    Content-Length:4375
    Content-Type:text/html; charset=utf-8
    Date:Wed, 02 Mar 2011 17:20:14 GMT
    Server:ASP.NET Development Server/10.0.0.0
    X-AspNet-Version:2.0.50727
    X-AspNetMvc-Version:2.0

    apologies for the previous mistake

    regards,

    jose
  14. Jose Granja
    Jose Granja avatar
    84 posts
    Member since:
    Oct 2009

    Posted 02 Mar 2011 Link to this post

    Here I attach my sample, I only added 

    <form id="form1" runat="server">
             
            <!-- You need to add this ScriptManager -->
            <asp:ScriptManager ID="scriptMgr" runat="server" />
             
            <div>
                This example demonstrates the benefits of an UpdatePanel.
            </div>
            <br />
             
            <!-- Only this area is updated on PostBack -->
            <asp:UpdatePanel ID="updatePnl" runat="server">
                <ContentTemplate>
                 
                    <fieldset>
                    <legend>Panel with random names</legend>
                    <br />
                    <asp:Button ID="Button1" runat="server"
                        Text="Generate random names"
                        Width="200px" />
                    <br />
                    <div style="height: 35px; padding-top: 5px; padding-bottom: 5px">
                     
                    </div>
                    <asp:Label Font-Bold=true ID="lblNames" runat="server" Text="">
                    </asp:Label>
                    <br />
                    </fieldset>
                        
                </ContentTemplate>
            </asp:UpdatePanel>
            
        </form>

    this to the index page the rest is default mvc project
  15. Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 07 Mar 2011 Link to this post

    Hello Jose,

    I am afraid that finding a resolution to this issue is out of our scope. I suggest that you post this issue in the Microsoft MVC forums.

    Greetings,
    Iana
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  16. Jose Granja
    Jose Granja avatar
    84 posts
    Member since:
    Oct 2009

    Posted 07 Mar 2011 Link to this post

    Have you got working ASP.NET AJAX component with MVC2? I'm starting to think it is not possible because MVC doesn't allow postbacks.. could you provide a working example? I feel like I'm losing my time. The only workaround I see is doing a ajax request using jquery and forget about the postback behaviour.

    could you confirm this? 

    regards,

    jose
  17. Answer
    Iana Tsolova
    Admin
    Iana Tsolova avatar
    3388 posts

    Posted 08 Mar 2011 Link to this post

    Hello Jose,

    Indeed, with MVC I would suggest that you do everything on the client and avoid performing page postbacks/callbacks.

    Best wishes,
    Iana
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
Back to Top