fatbargains
08-06-2002, 12:29 PM
I'm supposed to write a script in ASP that takes the user's NT logon username. Would someone please help me.
![]() | View Full Version : ASP Experts fatbargains 08-06-2002, 12:29 PM I'm supposed to write a script in ASP that takes the user's NT logon username. Would someone please help me. kcoster 08-07-2002, 07:32 AM You'll need something like response.write(Request.ServerVariables("LOGON_USER") peachtreewebworks 08-07-2002, 07:51 AM I use LoggedOnUser = Request.ServerVariables("AUTH_USER") intLength = Len (LoggedOnUser) For i = 1 to intLength strChar = mid(LoggedOnUser,i,1) if strChar = "\" then LoggedOnDomain = left(LoggedOnUser,(i-1)) LoggedOnUser = right(LoggedOnUser,(intLength - i)) end if next You also need to go into the site's properties in the IIS MMC and uncheck Allow Anonymous Access and check Windows NT Challenge/Response. That's the only way I've been able to get an intranet site to pull the user's login ID. peachtreewebworks 08-07-2002, 07:54 AM By the way, any reason this is posted twice ? http://www.webhostingtalk.com/showthread.php?&threadid=65133 |