Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

Posted

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" />

  • 2 weeks later...
Posted

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.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...