Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

error '80072020' ASP Webpage

Posted on 2008-10-07
6
Medium Priority
?
3,240 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
5 Comments
 
LVL 7

Expert Comment

by:Norush
ID: 22666890
0
 

Author Comment

by:maloriopolium
ID: 22667678
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 1000 total points
ID: 22668120
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
ID: 22675887
>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 1000 total points
ID: 23159956
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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows how to get a list of available printers for display in a drop-down list, and then to use the selected printer to print an Access report or a Word document filled with Access data, using different syntax as needed for working with …
Creating a Cordova application which allow user to save to/load from his Dropbox account the application database.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

824 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