|
-
Apr 25th, 2002, 06:02 PM
#1
Thread Starter
PowerPoster
Session_End
When is the Session_End() event fired?
I knocked out this code...
PHP Code:
protected void Session_End(Object sender, EventArgs e)
{
FileStream fStream = new FileStream("C:\\out.txt",FileMode.Create);
ASCIIEncoding ascEnc = new ASCIIEncoding();
fStream.Write(ascEnc.GetBytes("end event."),0,"end event.".Length);
fStream.Close();
}
And something similar in the Session_Start event, but this one never fired after I navigated away from the page. Am I missing something?
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
-
Apr 26th, 2002, 10:18 PM
#2
Fanatic Member
Re: Session_End
Originally posted by sunburnt
And something similar in the Session_Start event, but this one never fired after I navigated away from the page. Am I missing something?
The Session ends after a set period of in-activity. Not when the user leaves your site. I believe the default is 20 minutes. That would be 20 minutes after the last activity at your site.
They could leave your site, turn the computer off, go upstairs, have a quick shower and get dressed, and that Session could still be valid.
-
Apr 28th, 2002, 11:05 AM
#3
Thread Starter
PowerPoster
Well bah ; how am I supposed to determine when my user leaves the page, so I can clean up after them?
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
-
Apr 28th, 2002, 05:04 PM
#4
Fanatic Member
Originally posted by sunburnt
Well bah ; how am I supposed to determine when my user leaves the page, so I can clean up after them?
Well.....there is a Page_Unload event.
You don't want to clean up after your users if all they did is click a popup do you ?? The 20 minute timeframe before sessions being ended is a sensible compromise. It gives the user breathing room yet allows you to clean up eventually.
Try searching at DotNet Solutions
It's the archive for several .NET mail lists. Lots 'o information to be found there.
John
-
Apr 28th, 2002, 05:12 PM
#5
Thread Starter
PowerPoster
Thanks for your help. I'm not used to this web-based idea; I guess I'll have to start thinking about things differently than I normally do
Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.
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
|