Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Browser get timeout, but asp page keeps running on the server! Why?

Status
Not open for further replies.

fizban

Programmer
Nov 29, 2002
1
DK
I have an asp page that should be used to send emails to members of a mailing list. But it only works if the email-sending takes less than 2 hours.

When the asp-page is first opened, it sets the server and session timeouts to 24 hours.

On the page the user can press a button, and send emails to certain recipients of the mailing list.

When the user presses the button, the asp page sends the emails to an SMTP server with JMail. Every time an email is send with JMail, a space character is written to the browser, in order to prevent a browser timeout (but this doesnt seem to work).

My propblem is, that if too many emails are to be send, then the browser times out after approximately 2 hours.

But, the asp page keeps running, sending out emails!!!

I would like to ask if anyone knows:
1) Why the browser timeouts.
2) Why the asp page keeps running, after the browser has timed out.

I hope some of you know something that can give me a clue.

Best Regards
Stefan
 
The browser timing out does not send a request to the server to stop running. Therefore the server ticks away.

You can change Internet Explorers default timeout on your machine (not via the web on the clients machine).

Here's how:

(you might have to copy and paste the full link).

Writing the space doesn't actually write anything to the page until the page is completly parsed and ready to load. DeZiner
Never be afraid to try something new.
Remember that amateurs built the Ark.
Professionals built the Titanic
 
Hi mate,

Why not set your script to send the mail in batches rather than all in one? This way the browser would not timeout and all the mail would still be sent.

Hope this helps Wullie

sales@freshlookdesign.co.uk

The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top