Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2002
    Location
    Nottingham - UK
    Posts
    113

    Unanswered: Display NT User Name in ASP

    Hi Folks

    Im user II6 & a Windows NT Domain

    I'm just looking for a way to display the username on page of the client access the site.

    Is this possible, I have had a search but cant find anything that help...

    Hope you can.

    Regards

    Donald

  2. #2
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    I believe it's passed as one of the server variables... providing IIS is configured to request it of course... think it is one of these two...
    Code:
    Request.ServerVariables("REMOTE_USER")
    Request.ServerVariables("AUTH_USER")
    It won't work well over the internet but through an intranet it is generally pretty good.

  3. #3
    Join Date
    Nov 2005
    Posts
    20
    I've seen this code on various sites, but I never got it to work. I found it on 4guysfromrolla or a site similar to it.
    Code:
    'Store the NT LOGON name minus the doamin name in a session variable
    LN = Request.ServerVariables("REMOTE_USER")
    Session("NTLogon") = UCase(Right(LN, Len(LN) - InStr(1, LN, "\")))
    Programming/Web Design
    http://eofficeprofessionals.com/forums

    Offer solutions-not criticism.

  4. #4
    Join Date
    Nov 2003
    Location
    Christchurch, New Zealand
    Posts
    1,618
    It all depends on the security settings you have in IIS. I think you need to disable anonymous access,... I can't remember though as I haven't used it in ages.

  5. #5
    Join Date
    Mar 2005
    Posts
    94
    Yes anonymous access must be unchecked within the IIS manager, as well as yes you guessed it, they must be logged in. Now it will also store the domain in the username if your IIS server manages more then 1 domain.

    I do believe also that the remote user is the option your going to want to go with.
    ImageMage

    Access 2003, Dreamweaver MX 2k4, and everything else work piles on me

    Aspiring NEWB

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •