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

前端 未结 27 2426
遇见更好的自我
遇见更好的自我 2020-12-13 18:03

I have couple of update panels and jquery tabs on page. And also I am loading couple user controls on update panels. After user waited for couple of minutes (not checked the

相关标签:
27条回答
  • 2020-12-13 18:20

    " 1- Go to the web.config of your application "

    " 2- Add a new entry under < system.web > "

    3- Also Find the pages tag and set validateRequest=False

    Only this works for me. !!

    0 讨论(0)
  • 2020-12-13 18:20

    This was working fine in my code.. i solved my issue.. really

    Add below code in web.config file.

    <system.web>
        <httpRuntime executionTimeout="999" maxRequestLength="2097151"/>
    </system.web>
    
    0 讨论(0)
  • 2020-12-13 18:22

    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:

    <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

    0 讨论(0)
  • 2020-12-13 18:22

    Brother this piece of code is not a solution just change it to

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

    and you will see the error is there but you are just not throwing it on UI.

    0 讨论(0)
  • 2020-12-13 18:22

    Check your Application Event Log - my issue was Telerik RadCompression HTTP Module which I disabled in the Web.config.

    0 讨论(0)
  • 2020-12-13 18:22

    Use the following code below inside updatepanel.

    <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>
    
    0 讨论(0)
提交回复
热议问题