I want Forms Authentication only during session

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

  1. #1

    Default I want Forms Authentication only during session

    Hello out there,

    I am building an ASP.NET app that uses Forms authentication (as that
    seems the simplest way to do it). It works fine "out of the box". But
    what I would like is for the authentication to last only for a user's
    session, then the next time they try to connect, they are given the
    Login.aspx form again (their environment is not secure, so I want to
    force a logon each time). I'm not clear how I can achieve that.

    Any (simple) suggestions?

    Cheers,
    Peter Royle
    Peter Royle Guest

  2. Similar Questions and Discussions

    1. Please help: Forms authentication & new session -> does not return to the specified page after login
      If the user is not logged in and no session is present for the user when requesting a specific page it seems that the returnurl querystring...
    2. Forms Authentication | session ends | asp.net recycle
      Hi Guys I was wondering if you can help me out with the following problem. I created a basic secure | non secure website. So I have the root...
    3. User Session issue with ASP.NET Forms authentication & Windows 2003
      Hi, I first posted this query in just the aspnet ng but didn't get a reply so I'm posting here (probably more appropriate) Hope one of you guys...
    4. Forms Authentication with Session State
      Hey All. Currently, I have a login page that creates an encrypted Authentication Cookie (using FormsAuthenticationTicket). This happens after...
    5. Session with Forms authentication
      Hi, I use Forms Authentication type in my project.When I start my app. in the browser it works well.First it redirects the login page and after I...
  3. #2

    Default Re: I want Forms Authentication only during session

    This is very simple to implement:

    When the user is authenticated, and you set the session cookie, make the
    Persistent Cookie parameter False:

    FormsAuthentication.RedirectFromLoginPage(tbEmail. Text, False)

    Hope this helps,

    Paul Hobbs



    "Peter Royle" <pjroyle@tiscali.co.uk> wrote in message
    news:fc4ec3e.0312040735.7523915f@posting.google.co m...
    > Hello out there,
    >
    > I am building an ASP.NET app that uses Forms authentication (as that
    > seems the simplest way to do it). It works fine "out of the box". But
    > what I would like is for the authentication to last only for a user's
    > session, then the next time they try to connect, they are given the
    > Login.aspx form again (their environment is not secure, so I want to
    > force a logon each time). I'm not clear how I can achieve that.
    >
    > Any (simple) suggestions?
    >
    > Cheers,
    > Peter Royle

    Paul Hobbs Guest

  4. #3

    Default Re: I want Forms Authentication only during session

    "Paul Hobbs" <phobbs@blueprint.net> wrote in message news:<#bpKKcpuDHA.3220@tk2msftngp13.phx.gbl>...
    > This is very simple to implement:
    >
    > When the user is authenticated, and you set the session cookie, make the
    > Persistent Cookie parameter False:
    >
    > FormsAuthentication.RedirectFromLoginPage(tbEmail. Text, False)
    >
    > Hope this helps,
    >
    > Paul Hobbs
    Thanks, Paul. That's what I wanted. I knew I'd seen it somewhere!

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