From: Viju on
Hi,

We are using the EMDS provider, a third party provider, to read
attributes from Quest Active Roles Server(ARS) in our application. And
one amongst the attributes in ARS is a milti valued virtual attribute.
We have the vb script for accessing the same. but we are unable to
convert into
..net equivalent code. Has anyone tried reading the multi valued
virtual attributes
in .net?

Vb Script

set objUser = getObject("EDMS://" & user)
objUser.GetInfoEx Array("edsvaMDMRole"),0
arrRoles = objUser.getEx("edsvaMDMRole")

for each rolevalue in arrRoles
wscript.echo "User:" & objUser.name & vbTab & "MDMRole:" & rolevalue
next

..net code which we are using

DirectoryEntry objEDMSDir = new DirectoryEntry("EDMS://" + sUser,
sUserId, sPwd, AuthenticationTypes.Secure);
objEDMSDir.Invoke("GetInfoEx", new object[] { "edsvaMDMRole", 0 });
objEDMSDir.Invoke("GetEx", "edsvaMDMRole");

But the last line is throwing error like "The directory property
cannot be found in the cache.The specified property 'edsvaMDMRole'
cannot be found in the property cache."

Are we invoking the GetEx method correctly? How should we call the
GetEx method.
Instead of native method call, we have also tried with RefreshCache
method. But no luck.
Using RefreshCache, we are able to read values correctly for those
attributes which have multiple values, For ex, if edsvaMDMRole has
values as "Test,Test1" then we are able to get the data. If the
attribute has value like 'Test', we are not able to retrieve it
through RefreshCache method.

Any idea as how to read multi valued virtual attributes from AD