Javascript error PageRequestManagerServerErrorException on Response.Redirect

5 posts, 0 answers
  1. Kevin Kess
    Kevin Kess avatar
    8 posts
    Member since:
    Mar 2010

    Posted 14 May 2010 Link to this post

    I currently have a webpage that Inherits from a basePage class. Within the basePage class, I have some code to register an event handler for all unhandled errors on the web page, as seen below :

      protected override void OnInit(EventArgs e){
          // Trap any unhandled exceptions and log them.
          Error += BasePage_Error;
          base.OnInit(e);
        }

      private void BasePage_Error(object sender, EventArgs e){
          Exception ex = Server.GetLastError();
          int errorID = LogException(ex);
          Server.ClearError();
          Response.Redirect(Page.ResolveUrl(string.Format("~/Error.aspx?ReferenceNumber={0}", errorID)));
        }


    The problem comes in after I add in an RadAjax panel to the main page and surround my current form with the AjaxPanel. If some unhandled error ends up going to BasePage_Error routine, when it goes to the Response.Redirect line I get the following javascript error on the browser:

    Line: 4723
    Error: Sys.WebForms.PageRequestManagerServerErrorException: Input string was not in a correct format.

    The Response.Redirect command is somehow causing issues, but only when I have the AjaxPanel on the page. If I remove the panel, and run into the same issue, the Response.Redirect line works perfectly. Does anyone have an idea on what I can be doing wrong, or how to fix this issue?
  2. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 15 May 2010 Link to this post

    Hello Kevin,

    Please examine the following topic:
    Redirecting to another page

    Best regards,
    Daniel
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Kevin Kess
    Kevin Kess avatar
    8 posts
    Member since:
    Mar 2010

    Posted 18 May 2010 Link to this post

    This hasn't fixed my issue yet. I will include a more detailed example soon...
    Kevin
  4. Daniel
    Admin
    Daniel avatar
    4949 posts

    Posted 21 May 2010 Link to this post

    Hello Kevin,

    Can you reproduce this error using standard ASP.NET UpdatePanel or it happens with our controls only? If this is not the case, could you please attach a sample project so we can debug your application locally?

    Regards,
    Daniel
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  5. Kevin Kess
    Kevin Kess avatar
    8 posts
    Member since:
    Mar 2010

    Posted 26 May 2010 Link to this post

    I was able to resolve this issue, by registering for the onAsyncPostBackError event on the scriptmanager and capturing and redirecting from that routine.


    Kevin
Back to Top