Hello Dave,
Glad to see you again. How are you doing recently?
As for the SessionState, the "OnEnd" event and the SessionID does has some
particular things need to take care:
1. "Session_OnEnd" event is only working for ASP.NET InProc session Mode,
and not available for StateServer or SqlServer mode.
2. The SessionID for a certain client will always change on each page
request unless our ASP.NET application explicitly add a global.asax file
and "Session_OnEnd" event or add some data into the Session State bag. You
can get more info about ASP.NET session state in the following Q&A article:
http://www.aspnetresources.com/blog/session_state_qna.aspx
And regardless of the above things, in the Session_OnEnd event(in
global.asax), you can use the "Session" property to access some certain
property (such as SessionID) of the session about to be destroyed.
BTW, as you mentioned that you're using this event to do some temp file
clean up task. IMO, I would prefer use a timer thread to constantly monitor
the temp dir and delete aged temp files through their datetime attribuets
or our custom timestamp info in the filename. How do you think of this?
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial
response from the community or a Microsoft Support Engineer within 1
business day is
acceptable. Please note that each follow up response may take approximately
2 business days
as the support professional working with you may need further investigation
to reach the
most efficient resolution. The offering is not appropriate for situations
that require
urgent, real-time or phone-based interactions or complex project analysis
and dump analysis
issues. Issues of this nature are best handled working with a dedicated
Microsoft Support
Engineer by contacting Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.