Pull logged in User ID

Discussion in 'C#' started by sbeck, Sep 3, 2009.

  1. #1
    Hey guys, please help. I need to pull the userID of the person that is currently logged into the system. We've got an ASP.NET page here that shows the UserID but I can't see the code that's doing it. I don't want .net, I net to do this in ASP. The user will be logged into Windows using active directory and I want to pull out that username that they logged in with and look that up in a database to determine access before letting them view the webpage.
     
    sbeck, Sep 3, 2009 IP
  2. ccoonen

    ccoonen Well-Known Member

    Messages:
    1,606
    Likes Received:
    71
    Best Answers:
    0
    Trophy Points:
    160
    #2
    Request.ServerVariables("LOGON_USER") should give you the logged in user via Classic ASP
     
    ccoonen, Sep 10, 2009 IP
  3. topman

    topman Peon

    Messages:
    30
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Its depend on your coding structure, there is different ways to find out who is logged in now
    you can get the logged in user ID or email address from database
     
    topman, Nov 7, 2009 IP