为什么 UpdatePanel 会在几分钟后停止工作?
UpdatePanel 的哪些方面对时间敏感?
我有一个运行良好的 UpdatePanel。 如果我离开页面几分钟然后再回来,UpdatePanel 将不起作用。 查看 firebug,我看到它发送请求并获取响应。 但是,页面本身不会更新。 我也没有看到任何脚本错误。 到目前为止,除了时间的流逝之外,我还无法确定任何其他因素。
What aspects of the UpdatePanel are sensitive to time?
I have an UpdatePanel that works fine. If I leave the page for a few minutes and come back, the UpdatePanel doesn't work. Looking at firebug, I see that it sends the Request and gets a Response back. However, the page itself doesn't update. I'm not seeing any script errors either. So far I haven't been able to identify any other factor than the passage of time.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
也许你的应用程序域被回收或者你的会话丢失了。 您是否尝试过查看服务器上正在调用的内容? 这就是我对下一步该去哪里的建议。
Maybe your application domain recycled or your Session was lost. Have you tried seeing what is being called on the server? That'd be my suggestion on where to look next.
如果会话过期,则应该可以在没有 UpdatePanel 的情况下重现 - 返回回发并查看是否也会发生这种情况。 您甚至可能会更好地了解该错误,因为它不会被 UpdatePanel 在后台运行的 JavaScript 所吞噬。
If it's a session expiring, it should be reproducible without the UpdatePanel -- go back to postback and see if it also happens that way. You might even get a better idea of the error since it isn't potentially eaten by the JavaScript that the UpdatePanel runs underneath the hood.
会话很可能已过期,导致它发回不再与页面匹配的数据。
Most likely the session expired, causing it to send back data that no longer matches the page.
如果启用,请关闭 Firebug 网络监控。
Turn off Firebug network monitoring if enabled.
我注意到,如果您的更新面板中有大量控件,它可能会超时或拒绝工作。 有一次我在更新面板中有一个 gridview,每行有 3 个 ajax 日历控件.. gridview 中总共有 2,000 条记录.. updatepanel 不太高兴
I've noticed that if you have a TON of controls in your update panel, it can either timeout or refuse to work. One time I had a gridview in an update panel with three ajax calendar controls in each row.. total of 2,000 records in the gridview.. updatepanel was none too happy