A
Anthony Williams
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" exception?
If I am right, then something screwy is going on with my server. Allow me to
explain.
I have a wee page that sends 30 emails out to various people in our company
using a mailserver which is on the same machine, and using the standard
System.Web.Mail classes.
It's taking around 2-3 seconds per email, and - as you can guess - when it
gets to emails 26 to 30, the ASPX page responds with a
System.Web.HttpException: Request Timed Out exception.
My solution is to grab the current value of Server.ScriptTimeout, reset
Server.ScriptTimeout to 600, and once the loop is finished (or on
Page.Error) it sets it back to the grabbed value.
Except it doesn't.
I've set it to 600 (Server.ScriptTimeout = 600 ' 10 Minutes) and started it
again.
No joy. Request timed out. Grr.
Is there something I'm not doing properly, or do I have to set the
ScriptTimeout somewhere else, or do I have to do it in the web.config file
or...
Help! Please!
Thanks,
Anthony
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" exception?
If I am right, then something screwy is going on with my server. Allow me to
explain.
I have a wee page that sends 30 emails out to various people in our company
using a mailserver which is on the same machine, and using the standard
System.Web.Mail classes.
It's taking around 2-3 seconds per email, and - as you can guess - when it
gets to emails 26 to 30, the ASPX page responds with a
System.Web.HttpException: Request Timed Out exception.
My solution is to grab the current value of Server.ScriptTimeout, reset
Server.ScriptTimeout to 600, and once the loop is finished (or on
Page.Error) it sets it back to the grabbed value.
Except it doesn't.
I've set it to 600 (Server.ScriptTimeout = 600 ' 10 Minutes) and started it
again.
No joy. Request timed out. Grr.
Is there something I'm not doing properly, or do I have to set the
ScriptTimeout somewhere else, or do I have to do it in the web.config file
or...
Help! Please!
Thanks,
Anthony