Urgent Help on Authenticate Database User

Discussion in 'ASP .Net' started by Mae, Jul 7, 2003.

  1. Mae

    Mae Guest

    Dear all,

    I'm having a problem here. Suppose I have a database which
    store the username and password, the user must login in
    order to use the system. After login, I will store the
    username in a session "HttpContext.Current.Session
    ("UserLogin")". The problem is, how do I check whether the
    session has expired in the web.config <authentication> ?
    And the user can't simply type in the URL in the address
    bar before going thru the login.

    How to do it ? Please help here.

    Thanks in advance


    Cheers,
    Mae
     
    Mae, Jul 7, 2003
    #1
    1. Advertising

  2. Mae

    Natty Gur Guest

    Hi,

    First consider using Forms authentication [1]. asp.net will do the work
    for you.

    If you don’t want to use it for any reason you can check if
    Session("UserLogin") is empty in very page and redirect to the login
    page.

    [1] - http://www.15seconds.com/issue/020220.htm

    Natty Gur, CTO
    Dao2Com Ltd.
    28th Baruch Hirsch st. Bnei-Brak
    Israel , 51114

    Phone Numbers:
    Office: +972-(0)3-5786668
    Fax: +972-(0)3-5703475
    Mobile: +972-(0)58-888377

    Know the overall picture


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Natty Gur, Jul 7, 2003
    #2
    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. =?Utf-8?B?TWFyaw==?=

    Authenticate the user

    =?Utf-8?B?TWFyaw==?=, Jul 14, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    331
    Curt_C [MVP]
    Jul 14, 2004
  2. mike
    Replies:
    3
    Views:
    462
    =?Utf-8?B?Q3VydF9DIFtNVlBd?=
    Oct 26, 2005
  3. Replies:
    2
    Views:
    2,681
    Joe Kaplan \(MVP - ADSI\)
    Dec 8, 2005
  4. Luqman
    Replies:
    1
    Views:
    2,954
    =?Utf-8?B?RFdT?=
    Feb 15, 2006
  5. Jamie Allison

    JNDI Authenticate User

    Jamie Allison, May 2, 2006, in forum: Java
    Replies:
    0
    Views:
    1,347
    Jamie Allison
    May 2, 2006
Loading...

Share This Page