Click here to Skip to main content
15,913,335 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i want to transfer the user to other page in session end event of global.asax
Posted

1 solution

You can't.
Session_End is fired internally by the server and there is no HttpRequest associated with the event when it occurs. Hence: no Response.Redirect or Server.Transfer can be made as the connection to the user no longer exists.
 
Share this answer
 
Comments
yedhuvamshi 26-Jul-14 5:05am    
but i want to redirect the user when session expires wat to do?
OriginalGriff 26-Jul-14 5:17am    
You can't - that's the whole point. The session expires *becasue there is no user*

You will have to redirect the user *before* the session expires - and exactly how you do that is up to how your site works. Probably, the best way is to use a timer at the client to detect idle and redirect on that.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900