473,520 Members | 2,475 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ScriptTimeout and executionTimeout do not work

I am trying to make the page execute timeout after 2 seconds.

I first tried using the Server.ScriptTimeout = 2 in the Page_Load() event.
The next line does System.Threading.Thread.Sleep(10000); // 10 second pause

I was expecting the page to timeout with a Request timeout error. However,
it did not timeout and continue to execute for the full 10 seconds.

Next, I tried to use the <httpRuntime> configuration to set the
executionTimeout attribute to 2 like this:

<httpRuntime executionTimeout="2"/>

In the Web.config file. However this did not help either.

How can I force my ASPX page to timeout after 2 seconds?

Thanks,
Arsen V.
Nov 19 '05 #1
3 9896
Hi Arsen,

Welcome to ASP.NET newsgroup.
As for the executionTimeout setting for ASP.NET's <httpRuntime>
configuration not work problem. First I should admit that the
documentation on this attribute is really not very clear. The problem is
caused by the following reasons:

1. This setting will take effect only when we set the "debug" to false in
web.config , like:

<compilation
defaultLanguage="c#"
debug="false"
/>

when set to "debug=true" mode, the runtime will ignore the timeout setting.
2. Even we set the debug="false", the executionTimeout will still has some
delay when the value is very small. In fact, it is recommeded that we don't
set the timeout less than 1.5 minutes. And when we set the timeout to less
than 1 minute, the delay will span from 5 secs up to 15 secs. For example,
if we set executionTimeout="5", it may take a bout 15 seconds for the page
to timeout.

Hope helps.

Thanks & Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)



Nov 19 '05 #2
Hi Steven,

Thanks for the follow up. I will try to test by setting "debug" to "false".

Do you know why Server.ScriptTimeout does not work? Or is it also affected
by the "debug" value in the Web.config file.

Finally, if I want to have the script ALWAYS terminate after 2 seconds, what
can I do? Based on what you say, executionTimeout (and
Server.ScriptTimeout?) will not help... Is there a work around?

Thanks,
Arsen V.

"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:bx**************@TK2MSFTNGXA01.phx.gbl...
Hi Arsen,

Welcome to ASP.NET newsgroup.
As for the executionTimeout setting for ASP.NET's <httpRuntime>
configuration not work problem. First I should admit that the
documentation on this attribute is really not very clear. The problem is
caused by the following reasons:

1. This setting will take effect only when we set the "debug" to false in
web.config , like:

<compilation
defaultLanguage="c#"
debug="false"
/>

when set to "debug=true" mode, the runtime will ignore the timeout setting.

2. Even we set the debug="false", the executionTimeout will still has some
delay when the value is very small. In fact, it is recommeded that we don't set the timeout less than 1.5 minutes. And when we set the timeout to less than 1 minute, the delay will span from 5 secs up to 15 secs. For example,
if we set executionTimeout="5", it may take a bout 15 seconds for the page
to timeout.

Hope helps.

Thanks & Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Nov 19 '05 #3
Thanks for your reply Arsen,

The reason I didn't suggest use Server.ScriptTimeout property is because
this is a COM interface which is used in classic ASP. The executionTimeout
of ASP.NET is the replacement of ScriptTimeout in asp.net , so we no longer
need to use ScriptTimeout in asp.net.

In addition, as for
==================
have the script ALWAYS terminate after 2 seconds
==================

I'm afraid there is no means in asp.net's runtime setting since the
asp.net's runtime request processing management can't reach this level of
accuracy, 2 seconds is a too small value which may make the performance
very pool to monitor such a small internval. If we do need to let a
certain processing timeout, we can consider put the timeout logic in the
above application code level. For example, if we're executing SqlCommand ,
we can set the sqlcommand 's execution timeout. Or if we are executing a
async call in page code, we can set a timeout for the async call.....

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
23985
by: Bryan | last post by:
I'm looking for a definitive answer to a Server.ScriptTimeout question. if I add <% Server.ScriptTimeout = 300 %> to a page, does that then alter the default 90 second script timeout for ALL pages (if so, is it for that session or until??) or does it just alter the timeout for THAT individual page? I've been through the IIS docs and I...
0
1837
by: g_sharad | last post by:
Hi I am trying to use the server.scriptimeout for my asp code for sending the mails to my 1000 odd subscribers But after approx 150 records the script gives an error... saying pls reset the server timeout properties ----------- Active Server Pages error 'ASP 0113'
2
5924
by: Arsen V. | last post by:
I am trying to make the page execute timeout after 2 seconds. I first tried using the Server.ScriptTimeout = 2 in the Page_Load() event. The next line does System.Threading.Thread.Sleep(10000); // 10 second pause I was expecting the page to timeout with a Request timeout error. However, it did not timeout and continue to execute for the...
6
16064
by: Anthony Williams | last post by:
Hi all, Am I right in thinking that if I set Server.ScriptTimeout to, say, 600 that every request for an .ASPX page will wait up to 600 seconds before responding with a "Request Timed Out" exception? If I am right, then something screwy is going on with my server. Allow me to explain. I have a wee page that sends 30 emails out to...
4
3681
by: Alphonse Giambrone | last post by:
Can executionTimeout be set at run time? I need to increase it, to allow file uploads, but would prefer to only do it when the upload page is requested. TIA -- Alphonse Giambrone Email: a-giam at customdatasolutions dot us
0
1833
by: Virag Gutgutia | last post by:
Hi, I am trying to understand the behaviour of executionTimeout attribute in the httpRuntime element. From what I understood in the documentation that by setting the executionTimeout i can limit how long the webserver process a request before it throws an request time out exception. For this I created a web applicaton in whose web.config I...
1
3202
by: Chris | last post by:
I've created an aspx page that should time out every time it is executed, yet it never does. It seems as though the value of Server.ScriptTimeout is just being ignored by asp.net - I've also set executionTimeout in Machine.Config and Web.Config to = "3", which is also being ignored. I've tried rebooting, iisreseting, begging, and pleading. Can...
0
1449
by: Peter Jaffe | last post by:
I had noticed a number of people posting that they where having trouble getting the Web.config httpRuntime executionTimeout attribute to work as expected. I realized today that if the compilation debug attribute is set to "true" in the configuration, then the framework doesn't seem to timeout requests (probably because this might be...
2
5750
by: SevDer | last post by:
Hi We have a case where client clicks a button and series of events take place which some of them are web service calls. And sometimes, we are receiving ThreadAbortException on the final steps which results in unacceptable case. So far, I find out that I can modify executionTimeout to make the execution longer. However I do not wish to do...
2
319
by: simonZ | last post by:
Page.Server.ScriptTimeout =10000 No matter If I set Server.ScriptTimeout to larger values in code behind on page_load event, page is always executed in 90 seconds.? I don't have pool setted to recycle or something similar. Also I included the following line in web.config: <httpRuntime executionTimeout="1000"></httpRuntime> but nothing...
0
7632
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7213
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7595
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5771
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5162
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3298
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1687
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
859
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
533
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.