473,325 Members | 2,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

ScriptTimeout

Can anyone please explain to me what Server.ScriptTimeout actually is?
I don't quite understand the explanation in the documentation.

In my aspx page, I typed in the following codes:

private void Page_Load(object sender, System.EventArgs e)

{

Server.ScriptTimeout = 2;

for (int i = 0;i < 10;i++)
Thread.Sleep(1000);

}

but the request wasn't timed out. So I figure that
I must be misunderstanding something here.
Anyone please...

Ted
Nov 18 '05 #1
1 1938
SSW
Hi!

Server.ScriptTimeout = NumSeconds

A default ScriptTimeout can be set for a Web service or Web server by using
the AspScriptTimeout metabase property. The ScriptTimeout property cannot be
set to a value less than that specified in the metabase. For example, if
NumSeconds is set to 10, and the metabase setting contains the default value
of 90 seconds, scripts will time out after 90 seconds. However, if
NumSeconds were set to 100, the scripts would time out after 100 seconds.

Thread.Sleep(1000); // Thread sleeps for 1 Sec ie. 1000 Millisec
Below is sample: Script time out( Thread Sleep for 500 Second greater the 90
Second)
private void Page_Load(object sender, System.EventArgs e)
{
Server.ScriptTimeout = 90;
for (int i = 0;i < 500;i++)
Thread.Sleep(1000);
}

Below is sample: Script time Don't time out( Thread Sleep for 50 Second less
the 90 Second)
private void Page_Load(object sender, System.EventArgs e)
{
Server.ScriptTimeout = 90;
for (int i = 0;i < 50;i++)
Thread.Sleep(1000);
}

HTH

Thanks,

sswalia
MCSD, MCAD, OCA

"Ted Burhan" <tb*****@nospam.com.au> wrote in message
news:u3**************@TK2MSFTNGP12.phx.gbl...
Can anyone please explain to me what Server.ScriptTimeout actually is?
I don't quite understand the explanation in the documentation.

In my aspx page, I typed in the following codes:

private void Page_Load(object sender, System.EventArgs e)

{

Server.ScriptTimeout = 2;

for (int i = 0;i < 10;i++)
Thread.Sleep(1000);

}

but the request wasn't timed out. So I figure that
I must be misunderstanding something here.
Anyone please...

Ted

Nov 18 '05 #2

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

Similar topics

5
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...
1
by: Sam Kong | last post by:
Hello! I made an ASP page which converts big data from a CSV file to SQL Server. It takes so long like an hour. So in the page I wrote the following line. Server.ScriptTimeout = 100000 But...
0
by: Deepson Thomas | last post by:
Hi, i want to trap the ASP ScriptTimeout Error. Its okay if i can do it in the same page or redirect to any other page via coding or via any changes in IIS. This is very important to us. Waiting...
0
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...
6
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"...
1
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...
0
by: srt | last post by:
Hi, I have some problems with setting Server.ScriptTimeout. The posted script doesn't stop after 120 seconds (the timestamps are displayed after the 120 seconds and I stopped the server after 5...
3
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);...
2
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...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.