473,399 Members | 2,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

ADSI error when accessing from non-localhost browser

Good Day:

I am working on building a tool Using ASP/COM & IIS5.1 for a
non-administrative technical support team to change domain passwords for
users. I have the basic interface built and working from my developement
machine (Windows XP Pro SP 1A) which is hosting the pages for now. The
problem is that when I try to access the site from a browser on a different
pc using my credentials (IIS is running in Windows Authentication), it
appears that the ADSI queries stop working and I get the following errors:

a.. Error Type:
(0x8007200A)
/ASP_TEST.ASP, line 64

which corresponds with a code that queries Active Directory for a particular
OU to return the users within that OU.

I am a newbie to ASP developement so maybe I am missing something really
trivial, like can I even accomplish this task in this manner?

Thanx in advance,

Christopher Johannsen
Network Administrator
United Communications, Inc.
Jul 19 '05 #1
2 4066
Christopher Johannsen wrote:
Good Day:

I am working on building a tool Using ASP/COM & IIS5.1 for a
non-administrative technical support team to change domain passwords for
users. I have the basic interface built and working from my developement
machine (Windows XP Pro SP 1A) which is hosting the pages for now. The
problem is that when I try to access the site from a browser on a different
pc using my credentials (IIS is running in Windows Authentication), it
appears that the ADSI queries stop working and I get the following errors:

a.. Error Type:
(0x8007200A)
/ASP_TEST.ASP, line 64

which corresponds with a code that queries Active Directory for a particular
OU to return the users within that OU.

I am a newbie to ASP developement so maybe I am missing something really
trivial, like can I even accomplish this task in this manner?

Thanx in advance,

Christopher Johannsen
Network Administrator
United Communications, Inc.

I believe error 8007200a refers to the fact that you are requesting
an attribute that does not exist...

something about your attributes request is bad, or not permitted...

post the code?

D.
Jul 19 '05 #2
I will post the code however, be warned of my inexperience with ASP ( I know
that I am in-correctly using the session object for instance)

<HTML>
<TITLE>Domain Password Tool</TITLE>
<HEAD>

</HEAD>

<BODY>
<H1>Domain Password Reset Tool</H1>
<HR>
<%

Dim objOU, objUser, objAD, objADO, objCmd, objRS, strDept
Set objADO = Server.CreateObject("ADODB.Connection")
objADO.Open "Provider=ADsDSOObject;"
Set objCmd = Server.CreateObject("ADODB.Command")
objCmd.ActiveConnection = objADO

Session("department") = Request.QueryString("department")
Session("user") = Request.QueryString("user")

'On first page load display radio buttons for departments
If Session("department")= "" Then
Response.Write "<P><B>Choose a Department to see a list of users:</B></P>"

objCmd.CommandText = _

"<LDAP://dc=my,dc=domain,dc=com>;(objectClass=organizationa lUnit);name;subtr
ee"

Set objRS = objCmd.Execute

objRS.MoveFirst

Response.Write "<FORM method='GET' action='ASP_TEST.ASP'>"

Do Until objRS.EOF
Stop
If objRS.Fields("Name") = Null Then
strDept = ""
Else
strDept = objRS.Fields("Name")
End If

Select Case strDept
Case "_System"

Case "Domain Controllers"

Case Else Response.Write "<input type='radio' name ='department' " & _
"value='" & strDept & "'>" & strDept & "<BR>"
End Select

objRS.MoveNext
Loop
'Response.Write "<BR><INPUT type='Submit' value='Get Users'
name='department'>"
'If a
Else If Session("user") = "" Then
'Do User Lookups Here'
Dim strLDAP,intUAC
Const ADS_UF_ACCOUNTDISABLE = 2
strDept = Request.QueryString("department")
strLDAP = "LDAP://ou=" & strDept & ",dc=my,dc=domain"

Set objOU = GetObject(strLDAP)

objOU.Filter = Array("user")
Response.Write "<B>Choose User to change password for: </B><BR>"
Response.Write "<FORM method='GET' action='ASP_TEST.ASP'>"
For Each objUser In objOU
intUAC = objUser.Get("userAccountControl")
If intUAC AND ADS_UF_ACCOUNTDISABLE Then
Response.Write "<font color='red'>***Account: <B>" & _
objUser.DisplayName & "</B> Disabled - Contact Network Administrator to
re-enable</font><BR>"

Else
Response.Write "<input type='radio' name='user' " & _
"value='" & objUser.Name & "'>" & objUser.DisplayName & "<BR>"
End If
Next

Response.Write "<BR><INPUT Type='HIDDEN' name='department' value='" & _
strDept & "'>"
'Respons.Write "<INPUT type='Submit'>"
Else
Dim strUser
strUser = Request.QueryString("user")
Response.Write "<FORM method='GET' action='ASP_TEST.ASP'>"
Response.Write "Type New password here:<INPUT TYPE='Password'><BR>"
'Response.Write "Confirm: <INPUT TYPE='Password'><BR>"
Response.Write "<BR><INPUT Type='HIDDEN' name='department' value='" & _
Session("department") & "'>"
Response.Write "<BR><INPUT Type='HIDDEN' name='user' value='" & _
Session("user") & "'>"

End If
End If
Response.Write "<BR><INPUT type='Submit' value='Go'>"
%>

<BR>

</FORM>
</BODY>
</HTML>

"dnagel" <NO***********@hotmail.com> wrote in message
news:uP**************@tk2msftngp13.phx.gbl...
Christopher Johannsen wrote:
Good Day:

I am working on building a tool Using ASP/COM & IIS5.1 for a
non-administrative technical support team to change domain passwords for
users. I have the basic interface built and working from my developement
machine (Windows XP Pro SP 1A) which is hosting the pages for now. The
problem is that when I try to access the site from a browser on a different pc using my credentials (IIS is running in Windows Authentication), it
appears that the ADSI queries stop working and I get the following errors:
a.. Error Type:
(0x8007200A)
/ASP_TEST.ASP, line 64

which corresponds with a code that queries Active Directory for a particular OU to return the users within that OU.

I am a newbie to ASP developement so maybe I am missing something really
trivial, like can I even accomplish this task in this manner?

Thanx in advance,

Christopher Johannsen
Network Administrator
United Communications, Inc.

I believe error 8007200a refers to the fact that you are requesting
an attribute that does not exist...

something about your attributes request is bad, or not permitted...

post the code?

D.

Jul 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ryan Ritten | last post by:
I was wondering if anyone knew how (or if it's even possible) to cache the results of an ADSI call in asp for a longer period of time. Basically what I am doing is I have a website that loads the...
2
by: Enigma Webmaster | last post by:
Hi All, We've written a couple of functions which, when run in VB6 work fine and allow AD users to be updated. When we include the code into an ASP Page and try and update a users information...
14
by: Arran Pearce | last post by:
Hi, I am looking for a way to use System.DirectoryServices to find all users on a domain whos accounts are either locked out or disabled. I have used ADSIEdit and the mmc schema add-in to try...
3
by: Roy Osherove | last post by:
Hi folks. I have an ASP.Net application that runs a .Net dll that uses WMI and ADSI(both managed) to connect to a given IIS root and search through it. When not using the ASP.Net client, but...
8
by: msnews.microsoft.com | last post by:
I have ADSI code that I can make work at the command line. I cannot in any way get it to work in asp.net. Even using Windows authentication, impersonation on, and providing the credentials...
3
by: chat_devil | last post by:
hi, does anyone know if it is possible to remove an attribute that can not be read into the ADSI property cache/collection. i'm trying to do an eDirectory password change from .net directory...
1
by: LittlePython | last post by:
I am a little confused on why I can not detect an object that does not exist with a try and except. If I understand ADSI correctly from what I have read you do not create these objects but rather...
3
by: TomikZ | last post by:
I'd like to get some user account properties using .asp script. When I try to use ADSI WINNT provider it works fine except that I apparently cannot access some properties such as...
1
by: zmunoz | last post by:
I am working on a script using ADSI via COM in PHP. The script works for the most part when I query a user using the following function: function passwordExpires($userDN) { $comLDAP = new...
8
by: John | last post by:
Hi, gurus, How can I implement the following feature in C#: Set objGroup = GetObject("WinNT://" & strComputer & "/" & strGroup & ", group") For Each objMember In objGroup.Members...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.