大 ViewState 内容会导致 HTTP 错误 504 - 网关超时吗?

发布于 2024-10-02 16:59:26 字数 430 浏览 0 评论 0原文

我有一个 asp.net 页面,它似乎返回一个非常大的内容(5,648,733 字节,

大部分由 VIEWSTATE 消耗),并以 504 网关超时错误结束。 跟踪 http

我正在使用 Fiddler

请求/响应。基本上,当我通过单击按钮回发同一页面时,回发失败,并在 IE 和 FF 中显示这些错误:

Internet Explorer 无法显示网页 --> 在 IE 中

与服务器的连接已重置 当页面加载时。 --> 在FF

问题这是否是因为在VIEWSTATE中注入了大尺寸;如果是,主要是什么 原因是它加载页面但之后无法将页面发回?

I have one asp.net page which seems to return a very big content (5,648,733 bytes and that is

mostly consumed by VIEWSTATE) ending with a 504 Gateway timeout error. I am tracking the http

request/response by using Fiddler.

And basically, when I post-back the same page -by clicking a button- the post-back fails with thoose errors shown in IE and in FF:

Internet Explorer cannot display the webpage --> in IE

The connection to the server was reset
while the page was loading. --> in FF

Question: Can this be because of the big size injected in VIEWSTATE; and if yes, what is the main
reason so that it loads the page but cannot post the page back after?

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

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

发布评论

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

评论(3

淡笑忘祈一世凡恋 2024-10-09 16:59:26

我想知道您是否正在点击 MaxRequestLength;默认为 4MB。

I wonder if you are hitting the MaxRequestLength of the application; Default is 4MB.

白芷 2024-10-09 16:59:26

谢谢克里斯·谢弗!

在您指出我通过将这一行添加到我的 web.config 中更改了应用程序的 MaxRequestLength 后:

<httpRuntime maxRequestLength="60240"/>

并测试了页面以查看它是否有效。确实如此!

所以,现在我必须找到一种方法来减少该页面上 GridView 的 ViewState。

Thank you Chris Shaffer!

After you point me out that I have changed the MaxRequestLength of the application by adding this line to my web.config:

<httpRuntime maxRequestLength="60240"/>

And tested the page to see whether it works. And it did!

So, now I have to find a way to reduce ViewState of the GridView on that page.

九八野马 2024-10-09 16:59:26

有很多地方请求可能会超时。超时将发生在链中超时时间最低的链接中。

您应该检查 IE 中是否有任何代理设置。

There are many places where a request can timout. The timeout will occurr in the link in the chain that has the lowest timeout.

You should check if you have any proxy settings in IE.

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