草庐IT

c# - Sys.WebForms.PageRequestManagerServerErrorException : An unknown error occurred while processing the request on the server.“

coder 2023-07-05 原文

我在页面上有几个更新面板和 jquery 选项卡。而且我还在更新面板上加载了几个用户控件。用户等待几分钟后(未检查时间约 40 分钟)。当用户从提交按钮发送请求时出现以下错误?

'Sys.WebForms.PageRequestManagerServerErrorException:
Sys.WebForms.PageRequestManagerServerErrorException: An unknown 
error occurred while processing the request on the server. The status 
code returned from the server was: 0' when calling method: 
[nsIDOMEventListener::handleEvent]

我无法跟踪此问题来解决。但我确定。这是由 Ajax 引起的。大师,如果你知道解决方案。请告诉我。

最佳答案

当您在多个更新面板中将控件注册为 AsyncPostbackTrigger 时,有时会发生此问题。

如果那不是问题,请尝试在我在 this post 中找到的脚本管理器声明之后添加以下内容通过 manowar83 , 它复制并稍微修改了 this post通过 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>

这里讨论了更多的解决方案:http://forums.asp.net/t/1066976.aspx/9/10

关于c# - Sys.WebForms.PageRequestManagerServerErrorException : An unknown error occurred while processing the request on the server.“,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7881470/

有关c# - Sys.WebForms.PageRequestManagerServerErrorException : An unknown error occurred while processing the request on the server.“的更多相关文章

随机推荐