When you use ADSI (Active Directory Services Interfaces) version 2.5 to retrieve a value for a newly created attribute from a Site Server Membership database, the following error message may occur:
0x8000500C - "The Active Directory datatype cannot be converted to/from a native DS datatype"
With ADSI version 2.0, ADSI forces a schema cache update every time ADSI fails to get the syntax of attribute from the LDAP server, which is represented by the error message above. In ADSI version 2.5, the dynamic schema cache update was removed for performance reasons, and because the forced refresh was thrashing the RootDSE on LDAP version 2.0 servers.
Use the following script to refresh the schema and reload the cache before getting the attribute value:
You can also restart the Iisadmin service and the other Iisadmin dependant services to cause the schema cache to update.
oObject.Get("foo") ' fails with can't convert datatype
Set oSchema = GetObject("LDAP://ServerName:<port #>/Schema") 'get schema object
oSchema.GetInfo ' force refresh of schema
oObject.GetInfo ' force reload of cache info
oObject.Get("foo") ' Now you can read successfully. Get will succeed
ID članka: 241981 - posljednja izmjena: 19. lip 2014. - verzija: 1