|
-
Jan 10th, 2001, 07:37 AM
#1
Thread Starter
Black Cat
Suppose I have a ASP script which does some hefty db operations and takes a few minutes to execute. If I then make an administrative page so the appropriate people can click the link, what happens if they get bored waiting for the script to execute and go to an other page? I know there is a way to check if they're still connected and abort the script if they're not, but I'd rather have the script still run until its finished so the database gets fully updated. Will it work that way by default? I'm running NT 4.0 Server, SP6a, and IIS 4.
Also, will scripts timeout if they take too long to execute?
Thanks,
Josh
-
Jan 10th, 2001, 08:15 AM
#2
Fanatic Member
Hi JoshT
as for having it continuing if the user disconnects, I don't think there's anything you can do about it. as for scripts timing out, at the top of the hefty page use Server.ScriptTimeout = some redicusely high number and then the page won't expire.
Hope this helps
Ian
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
-
Jan 10th, 2001, 08:50 AM
#3
Thread Starter
Black Cat
Since there is a Response.IsClientConnected boolean you can use to end your script if they disconnect, I would think by default the script would keep executing if you don't check this, which is what I want it to do.
Does the Server.ScriptTimeout matter if I use Server.CreateObject to call a COM DLL? According to MSDN, "The timeout will not take effect while a server component is processing."
Code:
<%
Dim objMine
Set objMine = Server.CreateObject("MyDLL.MyClass")
objMine.DoLotsOfStuff 'takes a while
Set objMine = Nothing
%>
Thanks,
Josh
-
Jan 10th, 2001, 09:10 AM
#4
Fanatic Member
you can put in regardless, as if your dll takes to long to finish, the script times out regardless wether it ahs finished or not
Ian
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
-
Jan 10th, 2001, 10:44 AM
#5
Thread Starter
Black Cat
Thanks, I've set it for 7200, that should be enough. I've also noticed that the script that took about 50 seconds using VBScript/ASP only takes all of 2 seconds when compiled and called by the ASP page...
Josh
-
Jan 10th, 2001, 10:51 AM
#6
Fanatic Member
no problems. on a side note a recomendation when making web applications is that only use vbscript when it's a small system, if you doing very heavy suff as you found out, com DLL's come into their own in speed and what you can do with them. and one thing I can't emphasise enough is that if your using comm dll's over the web, is to use MTS to mange your dll's as IIS tends to fall over when dll's are hit big time.
Ian
Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|