I trying to get data from a ldap server using a vbhtml file.
I i run it on a win 2008 r2 i get string as retrun and everything is working.
If i run it on a win 2012 i get the same value as a System.Byte[]
Something must have changed with 2012, but what??
@imports System.DirectoryServices
@Code
Dim entryDn As String
Dim adRoot As DirectoryEntry = New DirectoryEntry("LDAP://ldap.xx.xx/ou=people,dc=xx,dc=xx", "", "", AuthenticationTypes.anonymous)
Dim searcher As DirectorySearcher = New DirectorySearcher(adRoot, "(uid=xxxxx)")
searcher.SearchScope = SearchScope.Subtree
searcher.PropertiesToLoad.Add("entryDN")
Dim SearchResult As SearchResult = searcher.FindOne()
If SearchResult IsNot Nothing Then
entryDn = SearchResult.Properties("entryDn").Item(0).ToString
End If
response.write (entryDn)
End Code
This sounds similiar to a known issue with the ADSI schema cache download. Would the traget server be an OpenLDAP server?
A quick check is to dump the RootDSE object of the target LDAP server. Check to see if it defines a supportedCababilities property.
My suggestion is to open a support incident with Microsoft and we can do some indepth trouble shooting to confirm this is the same issue, if it is the same issue, then the support incident would be considered non decrement and any $s you spent to create
it would be refunded.
Below is a link you can use as a reference for creating the incident:
looc
Member
4 Points
39 Posts
Strings return as System.Byte[] from LDAP
Jan 28, 2013 02:21 PM|LINK
Hi
I trying to get data from a ldap server using a vbhtml file.
I i run it on a win 2008 r2 i get string as retrun and everything is working.
If i run it on a win 2012 i get the same value as a System.Byte[]
Something must have changed with 2012, but what??
@imports System.DirectoryServices @Code Dim entryDn As String Dim adRoot As DirectoryEntry = New DirectoryEntry("LDAP://ldap.xx.xx/ou=people,dc=xx,dc=xx", "", "", AuthenticationTypes.anonymous) Dim searcher As DirectorySearcher = New DirectorySearcher(adRoot, "(uid=xxxxx)") searcher.SearchScope = SearchScope.Subtree searcher.PropertiesToLoad.Add("entryDN") Dim SearchResult As SearchResult = searcher.FindOne() If SearchResult IsNot Nothing Then entryDn = SearchResult.Properties("entryDn").Item(0).ToString End If response.write (entryDn) End CodeMaxV
Member
16 Points
3 Posts
Re: Strings return as System.Byte[] from LDAP
Feb 12, 2013 02:40 PM|LINK
This sounds similiar to a known issue with the ADSI schema cache download. Would the traget server be an OpenLDAP server?
A quick check is to dump the RootDSE object of the target LDAP server. Check to see if it defines a supportedCababilities property.
My suggestion is to open a support incident with Microsoft and we can do some indepth trouble shooting to confirm this is the same issue, if it is the same issue, then the support incident would be considered non decrement and any $s you spent to create it would be refunded.
Below is a link you can use as a reference for creating the incident:
http://support.microsoft.com/default.aspx?id=fh;en-us;offerprophone