Server.ScriptTimeout

B

Bryan

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 haven't been able to find the
definitive answer.

Thanks!
 
R

Ray at

Try it:

<%

Server.ScriptTimeout = 4
Do
Loop
%>

Then make a second page with:
<%
Do
Loop
%>

page1 shoud time out in 4 seconds. Then page2 should timeout in <server
setting> seconds.

Ray at work
 
D

Dave Anderson

Bryan said:
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?

In my experience, it only affects the current script. I have a script that
is set to 14400 because 7200 wasn't enough time -- at least it wasn't on our
old server. It affects no other scripts, though I can't speak for sessions.
In any case, you can try manually resetting the ScriptTimeout at the end of
your processing, if you are really worried about it.

Of course, Server.ScriptTimeout is a read/write property, so you could
simply set up a test involving two scripts if you want to see for
yourself...


--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 
D

Dave Anderson

Ray at said:
[p1]
Server.ScriptTimeout = 4
Do
Loop
[p2]
Do
Loop

How about this?

[p1] Server.ScriptTimeout = 10000
[p2] Response.Write(Server.ScriptTimeout)

--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top