Re: Global.asax
From: Philip Q [MVP] (wisemonk_at_mvps.org)
Date: 04/23/04
- Next message: Hans Kesting: "Re: Global.asax"
- Previous message: Peter Huang: "Re: Application.Run() and ShowDialog error"
- In reply to: ruca: "Global.asax"
- Next in thread: Hans Kesting: "Re: Global.asax"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 23 Apr 2004 22:15:39 +1200
ruca wrote:
> 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
>
>
The Session_End event is meant for clearing up any objects or items that
you have created for the session, you cannot interactively do anything
with the user.
When a session closes, it is usually because of a timeout because the
user has not requested anything from the server and the connection has
been lost (eg. the user has closed the browser).
The Session_End event is not triggered by the user, so you cannot do
anything with it.
You can only redirect the user when the next session starts again.
-- Philip Q Microsoft MVP [ASP.NET]
- Next message: Hans Kesting: "Re: Global.asax"
- Previous message: Peter Huang: "Re: Application.Run() and ShowDialog error"
- In reply to: ruca: "Global.asax"
- Next in thread: Hans Kesting: "Re: Global.asax"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|