473,385 Members | 1,861 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,385 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 1940
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...
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...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.