Solved

error '80072020' ASP Webpage

Posted on 2008-10-07
6
3,106 Views
Last Modified: 2013-12-24
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

0
Comment
Question by:maloriopolium
  • 2
  • 2
6 Comments
 
LVL 7

Expert Comment

by:Norush
Comment Utility
0
 

Author Comment

by:maloriopolium
Comment Utility
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.
0
 
LVL 7

Accepted Solution

by:
Norush earned 250 total points
Comment Utility
The problem is that your web page is running under the context of iUSR_Servername and does not have access rights.

Meaning that if you would make this user part of the administrator group it would work.
But making the user an administrator is a very bad idea for security reasons.

The article found heres will learn you how to overcome this:
http://www.serverwatch.com/tutorials/article.php/1476961
http://www.serverwatch.com/tutorials/article.php/1478231
http://www.serverwatch.com/tutorials/article.php/1482281
0
 

Author Comment

by:maloriopolium
Comment Utility
>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?


0
 
LVL 2

Assisted Solution

by:rmorreau
rmorreau earned 250 total points
Comment Utility
Is this question still active?  Is this mean for ASP or ASP.NET?

The token available at the server when using Integrated Windows Authentication does not permit those credentials to be used to access another service requiring credentials.  Have a search online for the double hop problem.

What you want to do is possible however, but it requires some additional steps to be completed.  You need to enable your web server to delegate credentials to the domain controllers (or ADAM service) in your environment.  A search for kerberos delegation (or constrained delegation) will help point you in the right direction there.

The system I've got this running in is using .NET Web Services and we also enable the impersonate option, its been ages since I worked with classic ASP you may or may not need to perform something equivalent to get this working.

Hope that helps
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now