Re: how to time out the web asp.net application when not in use for 15 minutes
From: Pril (pril_at_NOSPAMemail.si)
Date: 03/17/05
- Next message: Ken Schaefer: "Re: Question about a long session timeout (somewhat long)"
- Previous message: Pril: "Re: Newbie: Data transfer security problem"
- In reply to: enahar: "Re: how to time out the web asp.net application when not in use for 15 minutes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 17 Mar 2005 22:06:44 +0100
Try:
HttpContext.Current.Request.Response.Redirect
lp, pl
"enahar" <enahar@hotmail.com> wrote in message
news:uVfkmfnKFHA.2936@TK2MSFTNGP15.phx.gbl...
> Actually what i want to convey is
> when the session is time out asp.net application goes to session_end
event
> (the code is shown below)after rumnning the event it stays in the same
page
> .I want to transfer to sessionTimeOut.aspx page .But beacause Session_End
> fires outside of a Request into your system I can't use Response.Redirect.
>
> How do I redirect now?
>
> Regards
>
>
>
>
> protected void Session_End(Object sender, EventArgs e)
>
> {
>
> if (Session["SessionID"] != null)
>
> {
>
> try
>
> {
>
> string LogoutURL="../Public/SessionTimeOut.aspx";
>
> ESMSecurityModule.killSession(Session["SessionID"].ToString());
>
> Session.Clear();
>
> Session.Abandon();
>
>
> Response.Redirect(LogoutURL);
>
> }
>
> catch
>
> {
>
> }
>
> }
>
> }
>
>
>
>
>
> How to timing out the asp.net web application when not in use for 15
> >>> minutes although I am using the code in web.config file as below:
> >>>
> >>> <authentication mode="Forms">
> >>> <forms loginUrl="Security/Login.aspx" protection="All" timeout="20"
> >>> path="/" />
> >>> </authentication>
>
>
>
> "Brock Allen" <ballen@develop.com.i_hate_spam_too> wrote in message
> news:16148632465578650967312@msnews.microsoft.com...
> > Session_End fires outside of a Request into your system. So since
there's
> > no request, there's no where to transfer to. When you should do is check
> > upon the next request to see if your Session data is gone, and if so
take
> > the appropriate actions.
> >
> > Now, since you've mentioned a login page, why are you using Session
state
> > to track to see if the user's logged in? You should be using Forms
> > authentication, as this does all the necessary work to redirect the user
> > to a login page if they're not currently logged in.
> >
> > -Brock
> > DevelopMentor
> > http://staff.develop.com/ballen
> >
> >
> >
> >> Actually when session is timeout (20 minutes) it goes to session_end
> >> event
> >> in glaobal.asax.cs but i don't know how to transfer from this point to
> >> login
> >> page
> >> Can anyone help me !
> >> Regards
> >>
> >> "enahar" <enahar@hotmail.com> wrote in message
> >> news:%23pQOIyKFFHA.936@TK2MSFTNGP12.phx.gbl...
> >>
> >>> Hi,
> >>>
> >>> How to timing out the asp.net web application when not in use for 15
> >>> minutes although I am using the code in web.config file as below:
> >>>
> >>> <authentication mode="Forms">
> >>> <forms loginUrl="Security/Login.aspx" protection="All" timeout="20"
> >>> path="/" />
> >>> </authentication>
> >>>
> >>> Thanks
> >>>
> >
> >
> >
>
>
- Next message: Ken Schaefer: "Re: Question about a long session timeout (somewhat long)"
- Previous message: Pril: "Re: Newbie: Data transfer security problem"
- In reply to: enahar: "Re: how to time out the web asp.net application when not in use for 15 minutes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|