增加一个每页水平ASP.Net超时 [英] Increase ASP.Net timeout on a per page level
问题描述
是否有可能增加超时为一个ASP.net页面。我知道这是可能在服务器级别,但有可能在拖到绘图页的水平?
Is it possible to increase the timeout for a single ASP.net page. I know it is possible at the server level, but is it possible at thepage level?
我需要这个单一报告页面,需要2-3分钟来加载
I need this for a single report page that takes 2-3 minutes to load
什么想法?
推荐答案
我想你要找的是什么 ScriptTimeout
。您可以设置这页是这样的:
I think what you're looking for is ScriptTimeout
. You can set this in-page like this:
Page.Server.ScriptTimeout = 60;
的超时值以秒为单位。
The timeout value is in seconds.
此外,要注意的是,如果你在调试模式下运行,这被忽略,超时设置为最大值;我不认为这是你的一个问题,但无论如何,正如你增加超时,没有减少它。
Also, be aware of the fact that if you are running in debug mode, this gets ignored and the timeout is set to the maximum; I don't think that's an issue for you anyway though, as you're increasing the timeout, not decreasing it.
这篇关于增加一个每页水平ASP.Net超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!