简体   繁体   English

Asp.net Ajax,有时会挂起

[英]Asp.net Ajax , Hangs Sometimes

I use ASP.net Ajax on my project. 我在项目上使用ASP.net Ajax。 and using Session for state management. 并使用会话进行状态管理。

in some piece of code , I have some modalpop up , that contain UCs and do some things. 在某些代码中,我有一些modalpop up,其中包含UC并执行某些操作。

If I use UpdatePanel , sometimes, when I open popup, for a long time progress bar shows and dont do any things. 如果我使用UpdatePanel,有时,当我打开弹出窗口时,很长一段时间都会显示进度条,并且不执行任何操作。 if I refresh page it will work correctly. 如果我刷新页面,它将正常工作。 Also If I remove the UpdatePanel all methods work perfectly. 另外,如果我删除UpdatePanel,则所有方法都可以正常工作。

on pages that I have more than one popup( or any method that I run under update panel) I have this problem. 在我有多个弹出窗口(或在更新面板下运行的任何方法)的页面上,出现了此问题。

What was wrong? 什么问题? and how can I fix this? 我该如何解决?

您应该做的第一件事是获取Fiddler并查找任何未解决的请求。

What type of browser are you using? 您使用哪种类型的浏览器? Sometimes Google Chrome suffer from this problem like my personal website. 有时,例如我的个人网站,谷歌浏览器会遇到此问题。 Unfortunately, I've no idea what's going on,too. 不幸的是,我也不知道发生了什么。

Check with Firebug , in console mode you can see what http requests are sent, and if they already got a response (and see its response). 使用Firebug进行检查,在控制台模式下,您可以查看发送了哪些HTTP请求,以及它们是否已经得到响应(并查看其响应)。 It's a good place to start debugging everything that has to do with Ajax. 这是开始调试与Ajax有关的所有内容的好地方。

我发现,当您实际上没有支持IPv6的网络时,启用IPv6有时可能会引起这样的延迟,而系统尝试使用IPv6(并最终超时,然后恢复为IPv4)。

for more information , I load UC dynamiclly on page in OnInit method, therefore on every post back , UC load again , before when I load UC static , I have not this problem such as now. 有关更多信息,我在OnInit方法中动态地在页面上加载UC,因此在每次回发时,都再次加载UC,在我加载UC静态之前,现在没有这样的问题。 Also I use ModalUpdateProgress , that was a third party and open source control for Progressbar 我也使用ModalUpdateProgress,它是第三方和Progressbar的开源控件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM