Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server."

The Solution to Sys.WebForms.PageRequestManagerServerErrorException: An unknown error occurred while processing the request on the server." is


This issue sometimes occurs when you have a control registered as an AsyncPostbackTrigger in multiple update panels.

If that's not the problem, try adding the following right after the script manager declaration, which I found in this post by manowar83, which copies and slightly modifies this post by larryw:

<script type="text/javascript" language="javascript">
    Sys.WebForms.PageRequestManager.getInstance().add_endRequest(EndRequestHandler);
    function EndRequestHandler(sender, args){
        if (args.get_error() != undefined){
            args.set_errorHandled(true);
        }
    }
</script>

There are a few more solutions discussed here: http://forums.asp.net/t/1066976.aspx/9/10

~ Answered on 2011-10-24 20:25:53


Most Viewed Questions: