Re: Logg off users with session.timeout

From: Michelle (Michelle_at_bwalk.com)
Date: 02/25/05


Date: 25 Feb 2005 07:34:42 -0800

Here's what we do; if the session has expired or doesn't exist we
redirect to a "timed out" page. The timeout page contains only a
couple lines of javascript to pop up a box alerting the user that they
have timed out then redirects them back to the login page. We check
the session on every page to make sure it still exists.

in each page:
--------------------
   If Session("User") Is Nothing Then
            Response.Redirect("../TimedOut.aspx")
   End If

timeout page:
--------------------
   function window_onload()
   {
       alert('Your session has timed out. Please log back on.');
       top.location.href = 'default.aspx';
   }

I'd also like to hear what other people are using to see if we could
change our method to something better - or if this is the norm.

Thanks!
Michelle



Relevant Pages

  • Re: Logg off users with session.timeout
    ... > Thanks Michelle for your answer but what I need is logging off certain ... The timeout page contains only a ... >> the session on every page to make sure it still exists. ... >> change our method to something better - or if this is the norm. ...
    (microsoft.public.dotnet.framework.aspnet)
  • RE: Web.Config Timeout Expired Redirect Custom Error Page
    ... The ASP.NET session timeout is a passive not an active action. ... if the session has timed out and then redirect to another page. ... > timeout set in the config file expires. ...
    (microsoft.public.dotnet.general)
  • Re: Detecting Session Timeout
    ... All you can do on the server, is when there is a request after the timeout, ... you can detect it is a new session (either because your session variables ... are empty, or because IsNewSession returns true), and redirect then. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Global.asax
    ... How can I Redirect my web application to a page when a session ends? ... set a timeout) ... Hope this help you ruca ...
    (microsoft.public.dotnet.languages.vb)
  • Global.asax
    ... How can I Redirect my web application to a page when a session ends? ... set a timeout) ... Hope this help you ruca ...
    (microsoft.public.dotnet.framework.aspnet)