A
A Lake
Hi,
I'm trying to get a very simple task to work. Using the users login name
(gained from IE) I want to get their full name from AD (Win 2k and 2003 AD
domain).
I'm using this ASP code on the IIS server:
usr=mid(request.ServerVariables("LOGON_USER"),8)
Set User = GetObject("WinNT://domainname/" & usr & ",user")
response.write "Name is " & User.Fullname
set usr=nothing
This code works fine when run on the server direct using wscript, but when
served by the web server I get the error:
Active Directory (0x80070005)
General access denied error
So the code is OK, but I'm obviously missing something here. I know using
LDAP queries are another way but I want to keep this very simple.
Do I need to change some permissions or is there another way to do this? The
user could be in one of several OUs in the AD.
I'm trying to get a very simple task to work. Using the users login name
(gained from IE) I want to get their full name from AD (Win 2k and 2003 AD
domain).
I'm using this ASP code on the IIS server:
usr=mid(request.ServerVariables("LOGON_USER"),8)
Set User = GetObject("WinNT://domainname/" & usr & ",user")
response.write "Name is " & User.Fullname
set usr=nothing
This code works fine when run on the server direct using wscript, but when
served by the web server I get the error:
Active Directory (0x80070005)
General access denied error
So the code is OK, but I'm obviously missing something here. I know using
LDAP queries are another way but I want to keep this very simple.
Do I need to change some permissions or is there another way to do this? The
user could be in one of several OUs in the AD.