Go Back   Computer Forums > General Computing > Programming
Click Here to Login
Join Computer forums Today

Thread Tools Search this Thread Display Modes
Old 04-04-2005, 04:29 PM   #1
Beta Member
Join Date: Apr 2005
Posts: 2
Angry Problems to access Active Directory in VB.NET..

Hi everybody,
I've been searching for days to find a way to access Active directory database from my VB.NET appz and nothing made good results so far.. The Active directory DB is located onto a Win2k3 server but we have another on a NT4 server too.. Neither worked.. First, I was having a "Server not operational" error message, but fixed it in putting more parameters into the DirectoryEntry creation string. But now, I always get a "A referral was returned from the server(0x8007202B)" error message.. I tried to change as many things I could, but it still bugs me.. Any Idea?!??
Here's the source:
================================================== =
Dim oRoot As DirectoryEntry = New DirectoryEntry("LDAP://" & Me.mServer & ":389/DC=Dynanet,DC=com", "test", "test", AuthenticationTypes.Secure)
Dim oSearcher As DirectorySearcher = New DirectorySearcher(oRoot)
Dim oResult As SearchResult
'it bugz at this line, right on the For declaration
For Each oResult In oSearcher.FindAll
If Not CStr(oResult.GetDirectoryEntry().Properties("cn").Value) = "" Then Dim User As New LDAPUser(CStr(oResult.GetDirectoryEntry().Properties("uid").Value), _ CStr(oResult.GetDirectoryEntry().Properties("givenName").Value), _ CStr(oResult.GetDirectoryEntry().Properties("desc").Value), _ CStr(oResult.GetDirectoryEntry().Properties("email").Value), _ CStr(oResult.GetDirectoryEntry().Properties("phone").Value), _ CStr(oResult.GetDirectoryEntry().Properties("sms").Value)) Me.Ha****ems.Add(User.userId, User) Me.LisItems.Add(User) End If Next oResult Catch ex As Exception MsgBox(ex.ToString) Finally oRoot = Nothing oSearcher = Nothing oResult = Nothing End Try

Thanks all!

SpiXener is offline   Reply With Quote
Old 04-08-2005, 12:02 PM   #2
Fully Optimized
UK31337's Avatar
Join Date: Feb 2005
Posts: 2,776


Clicky ^^

Master of common sense. If you don't like it, stop reading.
UK31337 is offline   Reply With Quote
Old 04-11-2005, 09:18 AM   #3
Beta Member
Join Date: Apr 2005
Posts: 2

I already looked on Google, MSDN and everything else.. But they only tell me that "A referral return from the server" correspond to LDAP error Code LDAP_REFERRAL without telling how to fix the issue I have..

Anybody has a concrete idea?

Thanks in advance!
SpiXener is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

All times are GMT -5. The time now is 02:02 AM.

Powered by vBulletin® Version 3.8.8 Beta 4
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Search Engine Friendly URLs by vBSEO 3.6.0