|
 |
asp_cdo thread: RE: retrieving e-mail attribute using ASP, ADSI?
Message #1 by Eli Schilling <ESchilli@t...> on Thu, 29 Aug 2002 13:45:59 -0700
|
|
Hello, I'm trying to use the following code to obtain user information from
Active directory. I've only included the connection part because that is
what keeps failing.
When I run this page I get a very generic error on the following line:
set oADsObject = ADsNameSpace.OpenDSObject( ADsPath, uid, pwd, flags )
the message is:
Error Type:
(0x8007052E)
/getad.asp, line 19
Is something wrong with my code? Please help.
Thank you in advance,
Eli
<%
'First of all, get authenticated on this server.
Dim ADsPath
Dim pwd
Dim uid
Dim flags
ADsPath = "LDAP://mydc.mydomain.com/ou=users,dc=mydomain,dc=com"
uid = "MyID"
pwd = "MyPassword"
flags = 0
Dim ADsNameSpace
Set ADsNameSpace = GetObject("LDAP:")
Dim oADsObject
set oADsObject = ADsNameSpace.OpenDSObject( ADsPath, uid, pwd, flags )
If err.number = 0 Then
Response.Write("Login Was Successful: " & uid)
Else
Response.Write("Login Failed: " & uid)
Response.Write(err.number)
Response.Write(err.description)
End If
%>
Message #2 by "Siegfried Weber" <sweber@c...> on Thu, 29 Aug 2002 23:44:48 +0200
|
|
The error code translates into:
Logon failure: unknown user name or bad password.
<Cheers:Siegfried runat=3D"server" />
> -----Original Message-----
> From: Eli Schilling [mailto:ESchilli@t...]
> Sent: Thursday, August 29, 2002 10:46 PM
> To: ASP CDO
> Subject: [asp_cdo] RE: retrieving e-mail attribute using ASP, ADSI?
>
> Hello, I'm trying to use the following code to obtain user
information
> from
> Active directory. I've only included the connection part because that
is
> what keeps failing.
>
> When I run this page I get a very generic error on the following line:
> set oADsObject =3D ADsNameSpace.OpenDSObject( ADsPath, uid, pwd,
flags )
>
> the message is:
>
> Error Type:
> (0x8007052E)
> /getad.asp, line 19
>
> Is something wrong with my code? Please help.
>
> Thank you in advance,
> Eli
>
>
> <%
>
> 'First of all, get authenticated on this server.
>
> Dim ADsPath
> Dim pwd
> Dim uid
> Dim flags
>
> ADsPath =3D
"LDAP://mydc.mydomain.com/ou=3Dusers,dc=3Dmydomain,dc=3Dcom"
> uid =3D "MyID"
> pwd =3D "MyPassword"
> flags =3D 0
>
> Dim ADsNameSpace
> Set ADsNameSpace =3D GetObject("LDAP:")
>
> Dim oADsObject
> set oADsObject =3D ADsNameSpace.OpenDSObject( ADsPath, uid, pwd,
flags
)
>
> If err.number =3D 0 Then
> Response.Write("Login Was Successful: " & uid)
> Else
> Response.Write("Login Failed: " & uid)
> Response.Write(err.number)
> Response.Write(err.description)
> End If
>
> %>
>
Message #3 by Eli Schilling <ESchilli@t...> on Thu, 29 Aug 2002 15:21:43 -0700
|
|
Good call, thank you!
-Eli
-----Original Message-----
From: Siegfried Weber [mailto:sweber@c...]
Sent: Thursday, August 29, 2002 2:45 PM
To: ASP CDO
Subject: [asp_cdo] RE: retrieving e-mail attribute using ASP, ADSI?
The error code translates into:
Logon failure: unknown user name or bad password.
<Cheers:Siegfried runat="server" />
> -----Original Message-----
> From: Eli Schilling [mailto:ESchilli@t...]
> Sent: Thursday, August 29, 2002 10:46 PM
> To: ASP CDO
> Subject: [asp_cdo] RE: retrieving e-mail attribute using ASP, ADSI?
>
> Hello, I'm trying to use the following code to obtain user
information
> from
> Active directory. I've only included the connection part because that
is
> what keeps failing.
>
> When I run this page I get a very generic error on the following line:
> set oADsObject = ADsNameSpace.OpenDSObject( ADsPath, uid, pwd,
flags )
>
> the message is:
>
> Error Type:
> (0x8007052E)
> /getad.asp, line 19
>
> Is something wrong with my code? Please help.
>
> Thank you in advance,
> Eli
>
>
> <%
>
> 'First of all, get authenticated on this server.
>
> Dim ADsPath
> Dim pwd
> Dim uid
> Dim flags
>
> ADsPath = "LDAP://mydc.mydomain.com/ou=users,dc=mydomain,dc=com"
> uid = "MyID"
> pwd = "MyPassword"
> flags = 0
>
> Dim ADsNameSpace
> Set ADsNameSpace = GetObject("LDAP:")
>
> Dim oADsObject
> set oADsObject = ADsNameSpace.OpenDSObject( ADsPath, uid, pwd, flags
)
>
> If err.number = 0 Then
> Response.Write("Login Was Successful: " & uid)
> Else
> Response.Write("Login Failed: " & uid)
> Response.Write(err.number)
> Response.Write(err.description)
> End If
>
> %>
>
|
|
 |