By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,652 Members | 1,335 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,652 IT Pros & Developers. It's quick & easy.

code to handle session timeout?

P: n/a
In my global.asax file, I have in Session_End(Object sender, EventArgs e)

Because I want to have my user relogon. But it simply does not work. I
keep getting the null exception error because the Session no longer contains
the object that I have stored. I am trying to redirect my user gracefully
back to the login page with a message that informs them of the timeout.

I know it is a simple thing, but still have not been able to work it. If
Session_End in global.asax file does not serve this purpose, then what is it
Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
Session_End is there for cleaning resources that you put inside session
Server.Transfer won't work because the session end event isn't connect
to any request of the client (every request start context and session
end donít run in such a context. It fire when there isnít any client
request for predefine time) so thereís no one to transfer to.
Natty Gur[MVP]
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.