Authentication/Automatic redirection question

Discussion in 'ASP .Net' started by David Kleyman, Dec 17, 2003.

  1. Hello

    I would like to find out if there is a way to SignOut() the user and
    redirect the browser back to login page after time out period expired

    I've added these settings to my web.config file but they don't seem to take
    any effect

    <authentication mode="Forms">

    <forms name="frmLogin.aspx" loginUrl="/frmLogout.aspx?timeout=1" timeout="1"
    slidingExpiration="true" requireSSL = "false"></forms>

    </authentication>

    I know that there is a "refresh" metatag that I can use like this one

    <meta http-equiv="refresh" content="30; url=frmLogout.aspx?timeout=1">

    but that refreshes the page no matter if the users actively typing something
    into the textboxes on the page or if they are idle.

    Is there something I can do to accomplish this?

    Thank you

    David
    David Kleyman, Dec 17, 2003
    #1
    1. Advertising

  2. David Kleyman

    Michael Guest

    It'll have to be done on the client side, because there is no way you can
    control their browser like that on the server side, unless you handle this
    through page transitions.

    You should be able to write some javascript that runs the timer (which would
    be a stored time in the system), then for the page any
    onClick/onMouseOver/etc on controls would reset this timer (put the current
    time). If the timer exceeds what you want, you change the page on them.

    You'd have to have a javascript function running in the background the whole
    time, don't know what that would do as far as client performance, and they
    may not like having their page redirected because they read over the form
    real well but didn't move the mouse or hit a key.

    "David Kleyman" <> wrote in message
    news:...
    > Hello
    >
    > I would like to find out if there is a way to SignOut() the user and
    > redirect the browser back to login page after time out period expired
    >
    > I've added these settings to my web.config file but they don't seem to

    take
    > any effect
    >
    > <authentication mode="Forms">
    >
    > <forms name="frmLogin.aspx" loginUrl="/frmLogout.aspx?timeout=1"

    timeout="1"
    > slidingExpiration="true" requireSSL = "false"></forms>
    >
    > </authentication>
    >
    > I know that there is a "refresh" metatag that I can use like this one
    >
    > <meta http-equiv="refresh" content="30; url=frmLogout.aspx?timeout=1">
    >
    > but that refreshes the page no matter if the users actively typing

    something
    > into the textboxes on the page or if they are idle.
    >
    > Is there something I can do to accomplish this?
    >
    > Thank you
    >
    > David
    >
    >
    Michael, Dec 17, 2003
    #2
    1. Advertising

  3. David Kleyman

    George Durzi Guest

    David,
    If a user's forms authentication cookie has expired, the next time they try
    to access a protected resource, they will be signed out and automatically
    taken to the login page. Does that help?

    "David Kleyman" <> wrote in message
    news:...
    > Hello
    >
    > I would like to find out if there is a way to SignOut() the user and
    > redirect the browser back to login page after time out period expired
    >
    > I've added these settings to my web.config file but they don't seem to

    take
    > any effect
    >
    > <authentication mode="Forms">
    >
    > <forms name="frmLogin.aspx" loginUrl="/frmLogout.aspx?timeout=1"

    timeout="1"
    > slidingExpiration="true" requireSSL = "false"></forms>
    >
    > </authentication>
    >
    > I know that there is a "refresh" metatag that I can use like this one
    >
    > <meta http-equiv="refresh" content="30; url=frmLogout.aspx?timeout=1">
    >
    > but that refreshes the page no matter if the users actively typing

    something
    > into the textboxes on the page or if they are idle.
    >
    > Is there something I can do to accomplish this?
    >
    > Thank you
    >
    > David
    >
    >
    George Durzi, Dec 17, 2003
    #3
  4. Not really

    I need page to be redirected automatically after timeout expires

    Also
    what's the difference between using Response.redirect("page.aspx") and
    Server.transfer("page.aspx")?
    if I use Server.transfer request does not stay authenticated between the
    page navigations
    Request.IsAuthenticated returns false on the next page

    Thank you

    David

    David
    "George Durzi" <> wrote in message
    news:...
    > David,
    > If a user's forms authentication cookie has expired, the next time they

    try
    > to access a protected resource, they will be signed out and automatically
    > taken to the login page. Does that help?
    >
    > "David Kleyman" <> wrote in message
    > news:...
    > > Hello
    > >
    > > I would like to find out if there is a way to SignOut() the user and
    > > redirect the browser back to login page after time out period expired
    > >
    > > I've added these settings to my web.config file but they don't seem to

    > take
    > > any effect
    > >
    > > <authentication mode="Forms">
    > >
    > > <forms name="frmLogin.aspx" loginUrl="/frmLogout.aspx?timeout=1"

    > timeout="1"
    > > slidingExpiration="true" requireSSL = "false"></forms>
    > >
    > > </authentication>
    > >
    > > I know that there is a "refresh" metatag that I can use like this one
    > >
    > > <meta http-equiv="refresh" content="30; url=frmLogout.aspx?timeout=1">
    > >
    > > but that refreshes the page no matter if the users actively typing

    > something
    > > into the textboxes on the page or if they are idle.
    > >
    > > Is there something I can do to accomplish this?
    > >
    > > Thank you
    > >
    > > David
    > >
    > >

    >
    >
    David Kleyman, Dec 17, 2003
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. JoanneC

    Automatic redirection

    JoanneC, Aug 24, 2003, in forum: ASP .Net
    Replies:
    1
    Views:
    452
    Craig Deelsnyder
    Aug 24, 2003
  2. Guest
    Replies:
    1
    Views:
    762
    Guest
    Jun 29, 2004
  3. Replies:
    4
    Views:
    374
  4. Jéjé
    Replies:
    1
    Views:
    149
    Teemu Keiski
    Oct 20, 2003
  5. Andrew

    automatic redirection.....

    Andrew, Nov 5, 2004, in forum: Javascript
    Replies:
    1
    Views:
    93
Loading...

Share This Page