how to time out the web asp.net application when not in use for 15 minutes

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default how to time out the web asp.net application when not in use for 15 minutes

    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




    enahar Guest

  2. Similar Questions and Discussions

    1. Convert minutes to Hours and Minutes
      Hi There It's getting late and my brain is feeling like a Larne sausage :-) What I want to achieve is to convert a total number of minutes into...
    2. Time Format in datagrid (Hours, Minutes, Seconds)
      I have a column in my database that stores total seconds. I want to bind this colum to my datagrid. Is there a way to have the time show as hours,...
    3. Time question - add 15 minutes
      I have a time field in an access database and I want to be able to add 15 minutes to it. I can do this manually by taking the minute, adding 15...
    4. Weird spike in System time every 5:00 minutes...
      Hi All, I have what I consider to be an odd behavior on some of my AIX boxes. So far, on most of the AIX servers I have that are running Sybase,...
    5. Calculate elapsed time in minutes
      Try: DateDiff("n",,) Your code has you comparing TaskStart to TaskStart and then dividing the result (which is in minutes from the 'n'...
  3. #2

    Default Re: how to time out the web asp.net application when not in use for 15 minutes

    20 is not 15 :-)

    You also need to disable slidingExpiration by setting it to false
    and you need to make sure you dont set the cookie as persistant
    in your forms login.

    Assuming you have the .NET Framwework SDK with docs installed try this link:
    ms-help://MS.NETFrameworkSDKv1.1/cpgenref/html/gngrfforms.htm

    PL.

    "enahar" <enahar@hotmail.com> skrev i meddelandet 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
    >
    >
    >
    >

    PL Guest

  4. #3

    Default Re: how to time out the web asp.net application when not in use for 15 minutes

    Hi

    If I use the sliding Expiration in the code(web.config) as follows:

    <authentication mode="Forms" >

    <forms loginUrl="Security/Login.aspx" protection="All" slidingExpiration
    ="true" timeout="15" path="/" />

    </authentication>



    I am getting the following error message:


    Parser Error Message: Unrecognized attribute 'slidingExpiration'.

    Source Error:

    Line 31: -->
    Line 32: <authentication mode="Forms" >
    Line 33: <forms loginUrl="Security/Login.aspx" protection="All"
    slidingExpiration ="true" timeout="15" path="/" />
    Line 34: </authentication>
    Line 35:




    How and where do I use the SlidingExpiration attribute.

    Thanks



    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Ekta Agarwal Guest

  5. #4

    Default Re: how to time out the web asp.net application when not in use for 15 minutes


    Please have a look at this page:
    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpgenref/html/gngrfforms.asp[/url]

    PL.


    "Ekta Agarwal" <enahar@hotmail.com> skrev i meddelandet news:uerh0vUFFHA.3244@TK2MSFTNGP15.phx.gbl...
    > Hi
    >
    > If I use the sliding Expiration in the code(web.config) as follows:
    >
    > <authentication mode="Forms" >
    >
    > <forms loginUrl="Security/Login.aspx" protection="All" slidingExpiration
    > ="true" timeout="15" path="/" />
    >
    > </authentication>
    >
    >
    >
    > I am getting the following error message:
    >
    >
    > Parser Error Message: Unrecognized attribute 'slidingExpiration'.
    >
    > Source Error:
    >
    > Line 31: -->
    > Line 32: <authentication mode="Forms" >
    > Line 33: <forms loginUrl="Security/Login.aspx" protection="All"
    > slidingExpiration ="true" timeout="15" path="/" />
    > Line 34: </authentication>
    > Line 35:
    >
    >
    >
    >
    > How and where do I use the SlidingExpiration attribute.
    >
    > Thanks
    >
    >
    >
    > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!

    PL Guest

  6. #5

    Default Re: how to time out the web asp.net application when not in use for 15 minutes

    Hi,

    I am still getting the same error message after looking into the URL you
    have sent..

    Regards,



    Server Error in '/PITSHWebUI' Application.
    ------------------------------------------------------------------------
    --------

    Configuration Error
    Description: An error occurred during the processing of a configuration
    file required to service this request. Please review the specific error
    details below and modify your configuration file appropriately.

    Parser Error Message: Unrecognized attribute 'slidingExpiration'.

    Source Error:


    Line 32: <authentication mode="Forms" >
    Line 33: <!--<forms loginUrl="Security/Login.aspx" protection="All"
    slidingExpiration="false" timeout="15" path="/" />-->
    Line 34: <forms name="name" loginUrl="Security/Login.aspx"
    protection="All" timeout="15" path="/" slidingExpiration="true">
    Line 35: </forms>
    Line 36:


    Source File: c:\inetpub\wwwroot\PITSHWebUI\web.config Line: 34


    ------------------------------------------------------------------------
    --------
    Version Information: Microsoft .NET Framework Version:1.0.3705.6018;
    ASP.NET Version:1.0.3705.6018

    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Ekta Agarwal Guest

  7. #6

    Default Re: how to time out the web asp.net application when not in use for 15 minutes



    I cannot see anything wrong in your code below but obviously you must have an error in spelling or casing or
    something like that.

    PL.


    "Ekta Agarwal" <enahar@hotmail.com> skrev i meddelandet news:ODC0ocXFFHA.2540@TK2MSFTNGP09.phx.gbl...
    > Hi,
    >
    > I am still getting the same error message after looking into the URL you
    > have sent..
    >
    > Regards,
    >

    PL Guest

  8. #7

    Default Re: how to time out the web asp.net application when not in use for 15 minutes


    Hi,

    I have checked the spelling, casing .
    Still I can't use the slidingExpiration attribute in the Forms tag .I am
    getting the same error message
    '' Unrecognized attribute 'slidingExpiration' ''
    Can anybody help me why?

    Thanks

    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Ekta Agarwal Guest

  9. #8

    Default Re: how to time out the web asp.net application when not in use for 15 minutes



    Try installing ASP.NET 1.1, you are probably running 1.0 ?

    Downlaod from:
    [url]http://www.asp.net/download-1.1.aspx?tabindex=0&tabid=1[/url]

    Of ocurse, if you dont have control over the server this poses a problem.

    PL.

    "Ekta Agarwal" <enahar@hotmail.com> skrev i meddelandet news:%23NoQwr6FFHA.1836@tk2msftngp13.phx.gbl...
    >
    > Hi,
    >
    > I have checked the spelling, casing .
    > Still I can't use the slidingExpiration attribute in the Forms tag .I am
    > getting the same error message
    > '' Unrecognized attribute 'slidingExpiration' ''
    > Can anybody help me why?
    >
    > Thanks
    >
    > *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    > Don't just participate in USENET...get rewarded for it!

    PL Guest

  10. #9

    Default Re: how to time out the web asp.net application when not in use for 15 minutes

    Hi,

    Is there any other way to timing out the asp.net web application when
    not in use for 15 minutes without installing asp.net 1.1

    Thanks



    *** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
    Don't just participate in USENET...get rewarded for it!
    Ekta Agarwal Guest

  11. #10

    Default Re: how to time out the web asp.net application when not in use for 15 minutes

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

    enahar Guest

  12. #11

    Default Re: how to time out the web asp.net application when not in use for 15 minutes

    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
    [url]http://staff.develop.com/ballen[/url]


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


    Brock Allen Guest

  13. #12

    Default Re: how to time out the web asp.net application when not in use for 15 minutes

    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
    > [url]http://staff.develop.com/ballen[/url]
    >
    >
    >
    >> 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
    >>>
    >
    >
    >

    enahar Guest

  14. #13

    Default Re: how to time out the web asp.net application when not in use for 15 minutes

    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:

    [url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsent7/html/vxconASPNETAuthentication.asp[/url]

    -Brock
    DevelopMentor
    [url]http://staff.develop.com/ballen[/url]


    > 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
    >> [url]http://staff.develop.com/ballen[/url]
    >>> 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
    >>>>


    Brock Allen Guest

  15. #14

    Default Re: how to time out the web asp.net application when not in use for 15 minutes

    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
    > > [url]http://staff.develop.com/ballen[/url]
    > >
    > >
    > >
    > >> 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
    > >>>
    > >
    > >
    > >
    >
    >

    Pril Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139