Updatepanel 在代理下停止工作,并且仅发生在 IE 中

发布于 2024-10-21 18:44:18 字数 1855 浏览 6 评论 0原文

我们的网站上有一个更新面板,其中有许多链接按钮。

请注意,该网站在没有代理的

情况下在所有浏览器中都能正常工作,代理会将 url 从 www.mysite.net 更改为 0-www.mysite.net.edu.net 它在所有浏览器中也能正常工作,但 IE 的

问题是在代理下和 IE8 中,单击其中一个链接按钮时会出现错误,错误消息为

“网页错误详细信息

用户代理:Mozilla/4.0(兼容;MSIE 8.0;Windows NT 6.1;Trident/4.0;SLCC2;.NET CLR) 2.0.50727;.NET CLR 3.0.30729;Media Center PC 6.0;InfoPath.1;.NET4.0E)

时间戳:2011 年 3 月 13 日38:58 UTC

消息:Sys.WebForms.PageRequestManagerParserErrorException:无法解析从服务器接收的消息。此错误的常见原因是通过调用 Response.Write()、响应过滤器、HttpModules 或服务器修改响应。跟踪已启用。

详细信息: ' 附近解析错误。

我不知道这里出了什么问题,似乎 IE 无法解析响应?

我打开 IE 开发人员开发工具,它显示了错误发生的位置,

Sys.Net.XMLHttpExecutor = function Sys$Net$XMLHttpExecutor() {
/// <summary locid="M:J#Sys.Net.XMLHttpExecutor.#ctor" />
if (arguments.length !== 0) throw Error.parameterCount();
Sys.Net.XMLHttpExecutor.initializeBase(this);
var _this = this;
this._xmlHttpRequest = null;
this._webRequest = null;
this._responseAvailable = false;
this._timedOut = false;
this._timer = null;
this._aborted = false;
this._started = false;
this._onReadyStateChange = (function () {

    if (_this._xmlHttpRequest.readyState === 4 ) {
        try {
            if (typeof(_this._xmlHttpRequest.status) === "undefined") {
                return;
            }
        }
        catch(ex) {
            return;
        }

        _this._clearTimer();
        _this._responseAvailable = true;
        try {
            _this._webRequest.completed(Sys.EventArgs.Empty);
        }
        finally {//<-----------------HERE IS WHERE THE ERROR OCCURS               
            if (_this._xmlHttpRequest != null) {
                _this._xmlHttpRequest.onreadystatechange = Function.emptyMethod;
                _this._xmlHttpRequest = null;
            }
        }
    }
});

请帮忙!感谢一百万!

We have an updatepanel in our site and there are a number of linkbuttons in it.

Please note that the site works fine across all browsers without proxy

the proxy changes the url from for instance www.mysite.net to 0-www.mysite.net.edu.net it also works fine in all browsers but IE

the issue is that under proxy and in IE8, it gives an error when clicking one of the linkbuttons, the error message is

"Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; Tablet PC 2.0; InfoPath.1; .NET4.0C; .NET4.0E)

Timestamp: Sun, 13 Mar 2011 20:38:58 UTC

Message: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled.

Details: Error parsing near '

I have no idea what goes wrong here, it seems that IE can't parse the response ?

I open IE developer developer tool and it shows where the error occurs

Sys.Net.XMLHttpExecutor = function Sys$Net$XMLHttpExecutor() {
/// <summary locid="M:J#Sys.Net.XMLHttpExecutor.#ctor" />
if (arguments.length !== 0) throw Error.parameterCount();
Sys.Net.XMLHttpExecutor.initializeBase(this);
var _this = this;
this._xmlHttpRequest = null;
this._webRequest = null;
this._responseAvailable = false;
this._timedOut = false;
this._timer = null;
this._aborted = false;
this._started = false;
this._onReadyStateChange = (function () {

    if (_this._xmlHttpRequest.readyState === 4 ) {
        try {
            if (typeof(_this._xmlHttpRequest.status) === "undefined") {
                return;
            }
        }
        catch(ex) {
            return;
        }

        _this._clearTimer();
        _this._responseAvailable = true;
        try {
            _this._webRequest.completed(Sys.EventArgs.Empty);
        }
        finally {//<-----------------HERE IS WHERE THE ERROR OCCURS               
            if (_this._xmlHttpRequest != null) {
                _this._xmlHttpRequest.onreadystatechange = Function.emptyMethod;
                _this._xmlHttpRequest = null;
            }
        }
    }
});

PLEASE HELP! THANK A MILLION!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

水波映月 2024-10-28 18:44:18

这是因为 UpdatePanel 期望其响应以特定方式格式化(“|”分隔)。如果任何内容篡改了传输中数据的格式,则它无法解析响应。

Sys.WebForms.PageRequestManagerParserErrorException - 它是什么以及如何避免它

异步回发经过
与常规相同的生命周期事件
页面(这是我被问到的问题
经常)。仅在渲染阶段执行
事情变得不同了。我们捕捉到
仅渲染 UpdatePanel
我们关心的并将其发送至
客户端使用特殊格式。在
另外,我们还发送了一些其他的
信息片段,例如
页面标题、隐藏表单值、
表单操作 URL 和脚本列表。

Its because the UpdatePanel expects its Response formatted a specific way("|" delimited). If anything tampers with the format of the data in transit, it cannot parse the response.

Sys.WebForms.PageRequestManagerParserErrorException - what it is and how to avoid it

Asynchronous postbacks go through the
same life cycles events as regular
pages (this is a question I get asked
often). Only at the render phase do
things get different. We capture the
rendering of only the UpdatePanels
that we care about and send it down to
the client using a special format. In
addition, we send out some other
pieces of information, such as the
page title, hidden form values, the
form action URL, and lists of scripts.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文