Web服务调用JavaScript中造成浏览器死机(WSOD)的白色屏幕 [英] Web Service Call in JavaScript Causing White Screen of Death (WSOD) in Browser

查看:156
本文介绍了Web服务调用JavaScript中造成浏览器死机(WSOD)的白色屏幕的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面的规格:


  • ASP.NET 3.5使用ASP.NET AJAX

  • AJAX控件工具包

  • 的jQuery 1.3.2

  • Web服务

  • 在Windows Server
  • IIS6 2003 SP1

  • SP1的SQLServer 2005 SP3的网站是SSL

  • Infragistics的Web组件2009年卷。 2(使用非合气道控制),UltraWebGrid和Tree控件使用主要的。

下面的问题:
我在IE 7/8越来越死亡(WSOD)的白色屏幕。基本上,我有了一个具有AJAXControl工具包手风琴控制每个手风琴窗格内容是Infragistics的树中的左侧窗格中的页面。右边的窗格是一个< D​​IV> 有一个< IFRAME> ,其内容是根据被点击什么重装上阵在左侧菜单窗格。

Here's the problem: I'm getting the White Screen of Death (WSOD) in IE 7/8. Basically, I have a page that has a left pane that has an AJAXControl Toolkit Accordion control where each accordion panes content is an Infragistics Tree Control. The right pane is a <div> that has an <iframe> whose content is reloaded based on what's clicked in the left menu pane.

&LT; IFRAME&GT; ,与页面的一个或多个控制UltraWebGrid负载,当您在左窗格中单击菜单项。该网格的所有havea模板按钮列。当你点击一个网格的编辑按钮行一个弹出窗口编辑的记录被打开。这10次左右正常工作再上第十次(有时更早),在弹出的窗口,在地址栏中输入正确的网址打开,但网页加载从来没有。

In the <iframe>, a page with one or more UltraWebGrid controls loads up when you click on a menu item in the left pane. The grids all havea templated button column. When you click on the edit button of a grid row a popup window to edit the record is opened. This works fine for about ten times and then on the tenth time (sometimes earlier), the popup window opens with the correct URL in the address bar, but the page never loads.

我们有一个使用更新记录的一个弹出窗口的应用程序。大多数时候,当你在按钮,点击编辑记录,在弹出的窗口中打开并加载更新页面。然而,编辑记录一段时间后,突然弹出的窗口将打开,但是它保持空白,只是挂起。该URL地址栏。

We have an application that uses one popup window for updating records. Most of the time when you click on the button to edit a record, the popup window opens and loads the update page. However, after editing records for a while, all of a sudden the popup window will open, but it stays blank and just hangs. The URL is in the address bar.

加载了小提琴手我注意到,在更新页面请求永远不会发送这使我相信这是某种形式的客户端死机的。如果我复制在弹出的窗口中进入一个新的浏览器窗口中相同的URL,网页加载一般细。

Loading up Fiddler I noticed that the request for the update page is never sent which leads me to believe it's some kind of lockup on the client-side. If I copy the same URL that's in the popup window into a new browser window, the page generally loads fine.

观察:
  - 由于请求永远不会发送到服务器,它绝对相关的一些客户端或浏览器。
  - 仅出现,因为这似乎是包含客户端code范围内时,有哪些是怪异的网站流量的一些外表发生
  - 有被称为在后台的web服务每隔几秒钟,如果用户登录,但是这不会导致冷冻检查

Observations: - Since the request is never sent to the server, it's definitely something client-side or browser related. - Only appears to happen when there is some semblance of traffic on the site which is weird because this appears to be contained within client-side code - There is a web service being called in the background every few seconds checking if the user is logged on, but this doesn't cause the freeze.

我真的在这里损失。我GOOGLE WSOD但并不多,似乎出现与我具体WSOD。任何想法?

I'm really at a loss here. I've googled WSOD but not much seems to appear related to my specific WSOD. Any ideas?

什么真正的问题是

所以原来的内存泄漏(虽然我已经封闭了一些在客户端)不是问题。该问题是在客户端正在取得Web服务调用。有一个检查,如果用户登录每4秒(与另一个窗口同步),然后有Web服务调用获取用户preferences的弹出窗口和电网的状态。从我读过,Web服务必须是异步的。我认为通过从JavaScript调用它们成功/失败,他们是异步回调,但他们真的不是。它们是从视图客户端/浏览器点异步的,而是从服务器端,到Web服务的调用时和返回时,它完成保持的任何其它操作,因为有连接的数量有限。

So turns out the memory leaks (although I've sealed up some on the client-side) are not the issue. The issue is web service calls being made on the client-side. There is one that checks if a user is logged on every 4 seconds (to synchronize with another window) and then there are web service calls to get user preferences for a popup window and grid state. From what I've read, the web services have to be asynchronous. I assumed by calling them from JavaScript with success/fail callbacks that they were asynchronous but they really aren't. They're asynchronous from the client-side/browser point of view, but from the server-side, the call to the web service is made and returns when it is completed holding up any other operations since there is a limited number of connections.

那么,什么是只让Web服务方法异步的最简单的方法?是否Web服务需要转换到WCF Web服务或我可以用我现有的ASP.NET Web服务调用?

So what is the easiest way to just make the web service methods asynchronous? Does the web service need to be converted to a WCF web service or can I use my existing ASP.NET web service call?

而对历史的目的,这就是我认为这个问题本来是:

我是不是能够重现这在当地还是我们的测试服务器。不过,我提琴手模拟调制解调器的速度和所有突然我可以复制我的本地PC上的WSOD。因此,它似乎是开放,导致它呛,至少在我的测试环境的弹出窗口时慢或暂时慢速连接。

I wasn't able to reproduce this locally or on our testing servers. However, I got Fiddler to simulate modem speeds and all of sudden I can replicate the WSOD on my local PC. So it appears to be a slow or temporarily slow connection when opening a popup window that causes it to choke, at least in my test environment.

我没有运行IE不附加另一个测试, IEXPLORE.EXE -extoff ,但最终得到相同的结果。我也固定在网页上的iframe的iframe的改变正在重建每次的URL的问题。我的逻辑的一部分省略。现在的iframe只创建一次。之后,当我要加载新的内容......我混日子只有的src 属性更新。我注意到,在关闭JavaScript的一些挥之不去的窗口引用,所以现在这些都明确设置在封闭空时,我与他们完成的。

I did another test running IE without add-ons, iexplore.exe -extoff, but end up with the same result. I also fixed an issue where the iframe on the page was being recreated everytime the URL for the iframe changed. Part of my logic was omitted. Now the iframe is only created once. After that only the src attribute is updated when I want to load new content... my goof. I noticed some lingering window references in JavaScript closures, so now those are explicitly set to null in the closures when I'm done with them.

我也做了一些内存泄漏调查:
  - 据我可以告诉我没有在DOM和JavaScript或这里提到的其他泄露任何图案循环引用的http://www.ibm.com/developerworks/web/library/wa-memleak/?S_TACT=105AGX52&S_CMP=cn-a-wa

I've also done some memory leak investigation: - As far as I can tell I do not have any circular references in the DOM and JavaScript or the other leak patterns mentioned here, http://www.ibm.com/developerworks/web/library/wa-memleak/?S_TACT=105AGX52&S_CMP=cn-a-wa

$(文件)。就绪(函数(){
    功能清除(D){
        VAR一个= d.attributes,I,L,N;

$(document).ready(function() { function purge(d) { var a = d.attributes, i, l, n;

    if (a) {
        l = a.length;


    for (i = 0; i &lt; l; i += 1) {
        if (a[i]) {
            n = a[i].name;


            if (typeof d[n] === 'function') {
                d[n] = null;
                purgeCount++;
            }
        }
    }
}


a = d.childNodes;


if (a) {
    l = a.length;
    for (i = 0; i &lt; l; i += 1) {
        purge(d.childNodes[i]);
    }
}        

}
$(窗口).unload(函数(){
  清洗(document.body的);
  //警报(清除计数:+ purgeCount);
});

});

我的进步都没有固定的问题。在我的本地测试场景。有任何想法吗?任何人?任何人? Bueller?

None of my improvements have fixed the problem. in my local test scenario. Any ideas? Anyone? Anyone? Bueller?

最后更新

感谢大卫指出,这是造成在Web服务的问题,会话状态。 ASP.NET队列中的所有请求相同的会话。所以,如果时间过长的第一个请求块,它会撑起任何其他排队的请求。

Thanks David for pointing out that it was session state causing the problems in the web services. "ASP.NET queues all requests to the same 'session'. So if the first request blocks for too long, it will hold up any other queued requests."

所以我们最后做了尝试使用会话状态,以尽量减少网络服务,但我们也受到微软增加推荐的设置连接数,看的 http://msdn.microsoft.com/en-us/library/ff647786.aspx#scalenetchapt10_topic9

So what we ended up doing was try to minimize web services using session state but we also added the recommended settings by Microsoft for the number of connections, see http://msdn.microsoft.com/en-us/library/ff647786.aspx#scalenetchapt10_topic9

推荐答案

我想你可能有与会议要求同步的问题。您标记您的Web服务的处理程序需要会话状态?

I think you may be having an issue with Session request synchronization. Have you marked your web service handlers as requiring session state?

ASP.NET队列中的所有请求相同的会话。所以,如果时间过长的第一个请求块,它会撑起任何其他排队的请求。您可以关闭会话状态的页面,以避免这一点,是真正的异步,但您将无法在服务器,等上访问会话。

ASP.NET queues all requests to the same "session". So if the first request blocks for too long, it will hold up any other queued requests. You can turn off session state for the page to avoid this and be truly asynchronous, however you will be unable to access session on the server, etc.

如果您使用的是ashx的,你必须使用一个接口,可以访问会话状态,默认是关闭的,那么请检查您是否添加了这些接口中的一个,如果可能,删除:

If you are using .ashx, you have to use an interface to get access to session state,the default is off, so check if you added one of these interfaces and remove if possible:

public class FooHandler : IHttpHandler, IReadOnlySessionState // readonly access

public class FooHandler : IHttpHandler, IRequiresSessionState // read-write access

如果您使用的是aspx页面,它在默认情况下,你有一个Page指令属性,将其关闭:

If you are using an aspx page, it is on by default and you have to turn it off with a Page directive attribute:

    <%@ Page language="c#" Codebehind="WebForm1.aspx.cs"
AutoEventWireup="false" Inherits="WebApplication1.WebForm1"
EnableSessionState="false" %>

这篇关于Web服务调用JavaScript中造成浏览器死机(WSOD)的白色屏幕的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆