Dealing with script timeout

M

michal

hi guys,
i was wondering how you deal with script timeouts caused by huge file
uploads. Lets say I have a script timeout of 2 minutes and the user
uploads a file which takes more than this ...
Whats the best way to inform the user about this issue rather than
throwing the script timeout error.
What approaches do you use for this....
 
B

Bob Barrows [MVP]

michal said:
hi guys,
i was wondering how you deal with script timeouts caused by huge file
uploads. Lets say I have a script timeout of 2 minutes and the user
uploads a file which takes more than this ...
Whats the best way to inform the user about this issue rather than
throwing the script timeout error.
What approaches do you use for this....

Ummmm ... increase the script timeout on the page that does the upload?
Search www.aspfaq.com for "timeout"
 
M

michal

ya i know that i could increase the script timeout but this seems not
a solution to me. because if i increase it to lets say 20 minutes and
then someone comes with an even bigger file (or slow connection) which
takes longer to upload then i have the same problem. and i am thrown
back to the start in increasing it again and again ...
i checkd aspfaq but they have no approaches for this problem.
do you have any other ideas?
 
B

Bob Lehmann

Q - I have to drive my car 100 miles, but I keep running out of gas because
I only keep up to 3 gallons of gas in my car, which gets 20 mpg. What can I
do?

A - Put 5 gallons of gas in your car.

Q - That won't work. What if I have to drive 120 miles some other time, or
140 miles? I'd have to keep putting more gas in the car.

A - Sell your car and ride the bus.

Bob Lehmann
 
A

Anthony Jones

michal said:
hi guys,
i was wondering how you deal with script timeouts caused by huge file
uploads. Lets say I have a script timeout of 2 minutes and the user
uploads a file which takes more than this ...
Whats the best way to inform the user about this issue rather than
throwing the script timeout error.
What approaches do you use for this....

What's the maximum amount of time you are willing to put up with a user
trying to upload a file into your asp page?

Set your script timeout to that.
 
M

michal

yeah i know i can do this... so there is no real approach to tell the
user about the error?
oh i think i could catch all errors and check if the timeout error
happend. if this is the case i show a user friendly message...
 
A

Anthony Jones

michal said:
yeah i know i can do this... so there is no real approach to tell the
user about the error?
oh i think i could catch all errors and check if the timeout error
happend. if this is the case i show a user friendly message...

Do you mean a custom 500.100 error page?
 
M

michal

no i dont really need it because i should be able to do it with
on error resume next... have to try it the next time @ work.
 

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,996
Messages
2,570,237
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top