PC Review


Reply
Thread Tools Rate Thread

authentication problem with LDAP query (I think)

 
 
s_m_b
Guest
Posts: n/a
 
      27th Aug 2008
Basically, I have an aspx page generating the same query as an asp page.
The asp (classic) version works fine, but the ASP.NET (vb) one gives me an
error 80005000, no matter how I try it.

On Error Resume Next
'Try
Dim oRoot As DirectoryEntry = New DirectoryEntry(sql)
If Err.Number <> 0 Then Trace.Write("139 " & Err.Description)
oRoot.Username = "xxx\xxxxxx"
If Err.Number <> 0 Then Trace.Write("142 " & Err.Description)
oRoot.Password = "xxxxxxxx"
If Err.Number <> 0 Then Trace.Write("144 " & Err.Description)
'On Error Resume Next
oRoot.AuthenticationType = AuthenticationTypes.Secure
If Err.Number <> 0 Then Trace.Write("146 " & Err.Description)
Dim oSearcher As DirectorySearcher = New DirectorySearcher(oRoot)
If Err.Number <> 0 Then Trace.Write("147 " & Err.Description)

Dim oResults As SearchResultCollection
If Err.Number <> 0 Then Trace.Write("151 " & Err.Description)
Dim oResult As SearchResult
'Dim RetArray As New Hashtable()
' Try

'oSearcher.PropertiesToLoad.Add("uid")
'oSearcher.PropertiesToLoad.Add("givenname")
'oSearcher.PropertiesToLoad.Add("cn")
' On Error Resume Next
oResults = oSearcher.FindAll
If Err.Number <> 0 Then Trace.Write("160 " & Err.Description)

the error comes in the last line. I have added the .username, .password and
AuthenticationTypes.Secure lines with no improvement.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
.Net LDAP Authentication Problem (ADAM) steve_ager@yahoo.co.uk Microsoft Dot NET Framework 1 13th Dec 2006 06:44 PM
Forms Authentication with Active Directory LDAP Problem Tdar Microsoft ASP .NET 2 11th Oct 2005 09:52 PM
LDAP Authentication Michael D. Ober Microsoft Windows 2000 Active Directory 1 10th May 2005 01:46 AM
ldap authentication Corey Microsoft C# .NET 1 23rd Dec 2003 12:58 PM
performance problem with LDAP query nca Microsoft Windows 2000 Active Directory 4 11th Oct 2003 03:43 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:44 PM.