Mayfield2268 Posted November 18, 2003 Posted November 18, 2003 Is there a way to redirect to a different page in the Session_End procedure of global.asax? Thanks Quote
fadi Posted November 19, 2003 Posted November 19, 2003 the usual way to redirect to any page is: response.redirect("mypage.aspx") u can palce it wherever u want or need didnt that work??? Quote
Mayfield2268 Posted November 20, 2003 Author Posted November 20, 2003 I don't think that the Response.Redirect works in the Session_End event in Global.asax. Quote
jm_sullivan Posted November 24, 2003 Posted November 24, 2003 Certain objects are unavailable to you in the Session_End event. I believe that the Response object is one of them. It seems to me that there are 2 possible ways of doing what you want to do: 1. have the Web server call out to the client browser and redirect the page. I have no ideas on how to get that done. 2. have the browser use a timer set to the session time-out period and redirect the page. a Meta refresh tag could do this, although Im not sure if there is a limit on how long a meta refresh can be set. Good luck --Matt Quote
*Gurus* Derek Stone Posted November 24, 2003 *Gurus* Posted November 24, 2003 There is no accurate or appropriate method of determining when a session ends due to an event on the client. You need to re-evaluate your approach. Quote Posting Guidelines
shahdan Posted November 25, 2003 Posted November 25, 2003 Once seesion is expired.further browsing thru the application is not possible noramlly. I.e: it results in anerror. U may use the following method to redirect the page open the web.config file u can set mode to off ,on or remoteonly according to ur need give the page name in the defaultredirect page <customErrors defaultRedirect="redirect.aspx" mode="Off" /> Quote
Moderators Robby Posted November 25, 2003 Moderators Posted November 25, 2003 shahdan, what does this have to do with the question at hand? Quote Visit...Bassic Software
Shirtster Posted December 8, 2003 Posted December 8, 2003 http://www.extremeexperts.com/Net/Articles/RedirectingPageAfterSessionTimeout.aspx good article on specifying a page to redirect to when a user session times out. I think this is what you need Quote
bungpeng Posted December 9, 2003 Posted December 9, 2003 I don't think this solution is good, because the application will reload after certain intervals. What if user input data half way and the page automatic reload? But in web application, there is no perfect way to do that. For me, I will rather put this session validation in Page_Load event. If user press "Submit" button, I will save the data first before redirect him to login page. If possible, use Cookies rather than Session, at least there is no time out issue. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.