Re: how to time out the web asp.net application when not in use for 15 minutes
From: Brock Allen (ballen_at_develop.com.i_hate_spam_too)
Date: 03/16/05
- Next message: Ken Schaefer: "Re: Question about a long session timeout (somewhat long)"
- Previous message: enahar: "Re: how to time out the web asp.net application when not in use for 15 minutes"
- In reply to: enahar: "Re: how to time out the web asp.net application when not in use for 15 minutes"
- Next in thread: Pril: "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: Wed, 16 Mar 2005 14:55:17 -0800
As I suggested before you either need to add a check to every page to do
the redirect or you should be using Forms Authentication to to track the
user. I really think you'll have an easier time adopting Forms authentication.
Here's an article that should get you started:
-Brock
DevelopMentor
http://staff.develop.com/ballen
> 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: enahar: "Re: how to time out the web asp.net application when not in use for 15 minutes"
- In reply to: enahar: "Re: how to time out the web asp.net application when not in use for 15 minutes"
- Next in thread: Pril: "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
|