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


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



Relevant Pages

  • Re: Is the way i do, secure enought to avoid session hijacking
    ... >I am storing user login information in the session. ... >browser opens as if the sender logged in. ... > users IP address changes at each request! ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Logged in - Session timeout
    ... You have that info in a session, and then simply send them to: ... take any querystring info with it that you may need.... ... Now the users times out and you redirect them to your login page, ...
    (microsoft.public.inetserver.asp.general)
  • Re: User control remember state across pages without session
    ... Its a shame Microsoft don't extend viewstate beyond a single page because it ... An HTTP Request is received by the web server. ... It sends a Response to the client. ... > Request for a Page comes from any client, the Session Collection has a new ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: IIS bug-Concurrent request lock before IHttpModule.AcquireRequ
    ... into the session object. ... You can not have 2 simultaneous request for the same session. ... public partial class slow: System.Web.UI.Page ... public override void ProcessRequest ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: IIS bug-Concurrent request lock before IHttpModule.AcquireRequ
    ... shutDownMessage, ... IHttpModule stores the Hashtable of session objects in a private member ... You can not have 2 simultaneous request for the same ... protected void Page_Load(object sender, EventArgs ...
    (microsoft.public.dotnet.framework.aspnet)

Quantcast