URL Rewriting and PageRequestManagerServerErrorException

2 posts, 0 answers
  1. Dave Miller
    Dave Miller avatar
    64 posts
    Member since:
    Oct 2004

    Posted 03 Oct 2008 Link to this post

    This is not a question but I am sharing a possible solution on the "PageRequestManagerServerErrorException" when performing url rewriting with AJAX.

    I use RadControls exstensivelly in designing sites and have been running into this error with some of the new controls. Although the controls always work fine in the main form, I use a lot of dynamically loaded usercontrols containing RadControls and it is these that sometimes generate the error. I also do url rewriting on the main page and use a custom url rewrite form such as the one found here http://blog.angrypets.com/2007/01/aspnet_ajax_and.html.

    I have spent a day trying to fix this error with the new version of RadScheduler in a usercontrol. While it worked fine on my dev machine it generated the error when published to the live server. It seems the problem is caused by a change to the action attribute in the form after the postback. using the javascript found here http://forums.asp.net/t/1268230.aspx to the user control fixed the error.

    <script   language="javascript"   type="text/javascript">     
                var   form   =   Sys.WebForms.PageRequestManager.getInstance()._form;     
                formform._initialAction   =   form.action   =   window.location.href;     

    I think this may also work in other senarios with the "PageRequestManagerServerErrorException" error.

    I hope someone may find it useful.

  2. Todd Anglin
    Todd Anglin avatar
    2040 posts
    Member since:
    Aug 2005

    Posted 06 Oct 2008 Link to this post

    Thanks for the tip, Dave! I'm sure it will be helpful for others that search the forums. Glad you were able to find the workaround, too!

  3. DevCraft R3 2016 release webinar banner
Back to Top