Re: Global.asax

From: Hans Kesting (news.2.hansdk_at_spamgourmet.com)
Date: 04/23/04


Date: Fri, 23 Apr 2004 12:16:22 +0200


"ruca" <ruuca@iol.pt> wrote in message news:OOataCRKEHA.624@TK2MSFTNGP11.phx.gbl...
> Hi,
> How can I Redirect my web application to a page when a session ends? (I've
> set a timeout)
>
> I have this in my Global.asax in Session_End Event:
> Context.Response.Redirect("login.aspx")
>
> but it doesn't work
>
>
> --
> Programming ASP.NET with VB.NET
> Thank's (if you try to help me)
> Hope this help you (if I try to help you)
> ruca
>
>

When the session ends, there is no request to respond to (there has been
no request for the past 20 minutes, so the browser may have been closed
or even the internet connection to that browser is off)

What you probably want to do is, if the browser has displayed the last
screen for too long, redirect to a login page.
This is impossible from the server side, but possible from client side:
use <meta http-equiv=refresh> to redirect after the session should have
been expired.
Note: this may start a new session!

Hans Kesting



Relevant Pages

  • Re: What is URL rewriting?
    ... URL rewriting is the option when the client browser doesn't accept ... browser doesn't accept cookies. ... user information is usually stored as session object. ... so that the user agent can send that ID back on its next request. ...
    (comp.lang.java.programmer)
  • Re: back-button question
    ... to worry about satisfying every browser and configuration there is. ... some session variables and outputs a location header to ... check for the required tokens. ... redirect back to page 1 with error. ...
    (php.general)
  • Re: Why requests come sequentually, not in parallel?
    ... You can easily write your own custom Session object.. ... to avoid perf penalty due to request serialization. ... > 4) serve image B response. ... > The application acts as if it allows only ONE connection from the> browser ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: session Objects
    ... When a browser hits your site, session starts. ... I don't know about JSP, but in the PHP world, the page is only sent to ... What is usually done in PHP is to check on the *next* request whether ...
    (comp.lang.java.programmer)
  • Re: session advice
    ... Then why does Win2003 Server and IIS 6 suddenly recycle Sessions, invalidate view state and totally screw up my application? ... The server receives a request for a resource, processes the request, and sends the response. ... The browser loads one HTML document into memory at a time, and forgets the last document that was loaded upon reloading. ... So, the ASP.Net ISAPI has event handlers that fire, for example, the first time it receives a request from a browser it doesn't have a Session yet for. ...
    (microsoft.public.dotnet.framework.aspnet)