Link to home
Start Free TrialLog in
Avatar of maloriopolium
maloriopolium

asked on

error '80072020' ASP Webpage

Hi experts,

I am trying to do a query to active directory with the following code:

but I always get error '80072020'
at this line of code: Set oUser = GetObject("LDAP://" & sysInfo.Username)

I do not use anonymous access in IIS and am using Windows Authentication.
How do I get around this problem?

Thanks
public function authorizeUser()
   Dim sysInfo, oUser
   Dim group
   Dim ok 
		
   ok = false
		
   Set sysInfo = CreateObject("ADSystemInfo")
 
   Set oUser = GetObject("LDAP://" & sysInfo.Username)
 
   for each oGroupName in oUser.memberOf
      group = left(oGroupName,instr(oGroupName,",")-1)
      group = right(group, len(group) - 3)
	if group = "Adminstrators" then
	   ok = true
	end if
   next
end function

Open in new window

Avatar of Norush
Norush
Flag of Netherlands image

Avatar of maloriopolium
maloriopolium

ASKER

Thanks Norush,

The article seems to suggest that I need to tick the check box that says allow anonymous access in IIS. Would this be correct?
Also once I do that, does the default anonymous user have access rights to AD? How would I go about finding an account that has access rights to AD?
I'm just a bit confused.
ASKER CERTIFIED SOLUTION
Avatar of Norush
Norush
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
>The problem is that your web page is running under the context of iUSR_Servername and does not >have access rights.

Hmmm, but I am using Integrated Windows Authentication at the moment. I would have thought this means the web page is running under the context of whoever is logged into the computer?


SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial