Form Authentication

Discussion in 'ASP .Net Security' started by Frank, Jan 31, 2006.

  1. Frank

    Frank Guest

    Hi,
    I'm creating a class, that will go to a database and authenticate if the
    user
    exist and the password is correct.
    What I don't understand, is how I tell my application that the user is
    authenticated (during a time period), so It doesn't keep asking for the
    login.
    Francisco
     
    Frank, Jan 31, 2006
    #1
    1. Advertising

  2. Hi,

    start here:
    http://samples.gotdotnet.com/quickstart/aspplus/doc/formsauth.aspx

    ---------------------------------------
    Dominick Baier - DevelopMentor
    http://www.leastprivilege.com

    > Hi,
    > I'm creating a class, that will go to a database and authenticate
    > if the
    > user
    > exist and the password is correct. What I don't understand, is how I
    > tell my application that the user is authenticated (during a time
    > period), so It doesn't keep asking for the login. Francisco
    >
     
    Dominick Baier [DevelopMentor], Jan 31, 2006
    #2
    1. Advertising

  3. Frank

    Frank Guest

    Do I need a session variable to say the user is log on or SetAuthCookie and
    GetAuthCookie is enough to do so.
    Thanks


    "Dominick Baier [DevelopMentor]" wrote:

    > Hi,
    >
    > start here:
    > http://samples.gotdotnet.com/quickstart/aspplus/doc/formsauth.aspx
    >
    > ---------------------------------------
    > Dominick Baier - DevelopMentor
    > http://www.leastprivilege.com
    >
    > > Hi,
    > > I'm creating a class, that will go to a database and authenticate
    > > if the
    > > user
    > > exist and the password is correct. What I don't understand, is how I
    > > tell my application that the user is authenticated (during a time
    > > period), so It doesn't keep asking for the login. Francisco
    > >

    >
    >
    >
     
    Frank, Jan 31, 2006
    #3
  4. Hi,

    you usually use RedirectFromLoginPage or SetAuthCookie to set the cookie.
    The FormsAuth infrastructure will transparently decrypt the cookie and populate
    Context.User on subsequent requests for you. No SessionState needed at all.

    look at

    Context.User.Identity.Name and .IsAuthenticated

    after authentication

    ---------------------------------------
    Dominick Baier - DevelopMentor
    http://www.leastprivilege.com

    > Do I need a session variable to say the user is log on or
    > SetAuthCookie and GetAuthCookie is enough to do so. Thanks
    >
    > "Dominick Baier [DevelopMentor]" wrote:
    >
    >> Hi,
    >>
    >> start here:
    >> http://samples.gotdotnet.com/quickstart/aspplus/doc/formsauth.aspx
    >> ---------------------------------------
    >> Dominick Baier - DevelopMentor
    >> http://www.leastprivilege.com
    >>> Hi,
    >>> I'm creating a class, that will go to a database and authenticate
    >>> if the
    >>> user
    >>> exist and the password is correct. What I don't understand, is how I
    >>> tell my application that the user is authenticated (during a time
    >>> period), so It doesn't keep asking for the login. Francisc
     
    Dominick Baier [DevelopMentor], Jan 31, 2006
    #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. Li Zhang
    Replies:
    4
    Views:
    6,141
    softip
    Feb 27, 2009
  2. Dom
    Replies:
    0
    Views:
    484
  3. Dom
    Replies:
    0
    Views:
    526
  4. Max
    Replies:
    2
    Views:
    1,133
  5. kitchai yong via .NET 247

    authenticate win32 form client with form based authentication web services

    kitchai yong via .NET 247, May 13, 2004, in forum: ASP .Net Web Services
    Replies:
    1
    Views:
    243
    Jan Tielens
    May 13, 2004
Loading...

Share This Page