浏览器超时而asp.net应用程序保持运行 [英] browser timeouts while asp.net application keeps running

查看:134
本文介绍了浏览器超时而asp.net应用程序保持运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到它需要很长的时间,ASP.NET生成的网页(超过2小时)回复的情况。这是由于codebehind运行一段时间(很长,慢环)。

I'm encountering a situation where it takes a long time for ASP.NET to generate reply with the web page (more than 2 hours). It due to the codebehind running for a while (very long, slow loop).

浏览器(包括IE浏览器和放大器;火狐)停止等待的答复(约一小时后),并给出了通用无法显示网页错误(类似于你会看到什么,如果你想尝试navige到不存在的服务器)。

Browser (both IE & Firefox) stops waiting for the reply (after about an hour) and gives generic cannot display webpage error (similar to what you would see if you'd try to navige to non-existing server).

与此同时asp.net应用源源不绝(我可以看到它在调试器),并最终完成。

At the same time asp.net app keeps going (I can see it in debugger) and eventually completes.

为什么会出现这种情况?有没有在web.config中影响这个任何设置?我希望有我就是缺少是造成这种超时设置。

Why does this happen? Are there any settings in web.config to influence this? I'm hoping there's a timeout setting that I'm missing that's causing this.

也许在IE或Firefox的设置?但我认为他们等待在服务器保持连接活着。

Maybe a settings in IE or Firefox? But I think they wait while the server is keeping connection alive.

我遇到这甚至当我在调试模式下我的本地机器上启动应用程序(编译与调试=真),从VS(所以它不是运行在IIS上,但ASP.NET开发服务器)。

I'm experiencing this even when I launch app in debug mode (with compilation debug="true") on my local machine from VS (so it's not running on IIS, but on ASP.NET Dev Server).

我知道这是不好的,它需要这么长时间来生成页面,但它并没有在这个阶段重要。加快它会采取很多额外的工作和延迟并不重要。这是在内部使用。

I know it's bad that it takes so long to generate the page, but it doesn't matter at this stage. Speeding it up would take a lot of extra work and the delay doesn't really matter. This is used internally.

我知道我可以解决此问题重新设计运行逻辑,后台进程,当它通过AJAX做收到通知,或将其拉至一个桌面应用程序或服务,或什么的。类似的规定将最终完成,但是这不是我想咨询一下现在。

I realize I can redesign around this issue running logic to a background process and getting notified when it's done through AJAX, or pull it to a desktop app or service or whatever. Something along those lines will be done eventually, but that's not what I'm asking about right now.

推荐答案

听起来你使用IE浏览器,它是超时在等待服务器的响应。

Sounds like you're using IE and it is timing out while waiting for a response from the server.

您可以找到一个TechNet文章来调整这个限制:

You can find a technet article to adjust this limit:

http://support.microsoft.com/kb/181050

在设计时,Internet Explorer委以
  超时限制为服务器
  返回数据。超时限制是
  五分钟版本4.0和4.01
  并且是60分钟版本5,6,
  和7因此,Internet Explorer的
  不无休止等待服务器
  回来的数据在服务器
  有问题。回到顶端

CAUSE

By design, Internet Explorer imposes a time-out limit for the server to return data. The time-out limit is five minutes for versions 4.0 and 4.01 and is 60 minutes for versions 5.x, 6, and 7. As a result, Internet Explorer does not wait endlessly for the server to come back with data when the server has a problem. Back to the top

在一般情况下,如果在页面内没有几个返回
  分钟,很多用户认为某个
  问题已发生,并停止
  处理。因此,设计您的服务器
  过程在5个返回数据
  分,以便用户不必
  等待的时间段广泛

In general, if a page does not return within a few minutes, many users perceive that a problem has occurred and stop the process. Therefore, design your server processes to return data within 5 minutes so that users do not have to wait for an extensive period of time.

这篇关于浏览器超时而asp.net应用程序保持运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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