I am attempting to write a class for C# that will retrieve a user's UP
(built using the LDAP Libraries for C# SDK)

Here is what I have so far...

private LdapConnection myLdap = new LdapConnection();
private const string NMASLDAP_GET_PASSWORD_REQUEST =
"2.16.840.1.113719.1.39.42.100.13";
private const string NMASLDAP_GET_PASSWORD_RESPONSE =
"2.16.840.1.113719.1.39.42.100.14";

myLdap.SecureSocketLayer = true;

myLdap.Connect(ldapHost, System.Convert.ToInt32(ldapPort));
myLdap.Bind(adminDN, adminPass);

System.IO.MemoryStream encodedData = new
System.IO.MemoryStream();
LBEREncoder encoder = new LBEREncoder();

Asn1Integer nmasver = new Asn1Integer(1);
Asn1OctetString lookupDN = new Asn1OctetString(userDN);

nmasver.encode(encoder, encodedData);
lookupDN.encode(encoder, encodedData);

LdapExtendedOperation myOp = new
LdapExtendedOperation(NMASLDAP_GET_PASSWORD_REQUES T,
SupportClass.ToSByteArray(encodedData.ToArray()));
LdapExtendedResponse response = myLdap.ExtendedOperation(myOp);

MessageBox.Show(response.ToString());

I keep getting a "Invalid NMAS extension version." error... Any ideas
as to how I am supposed to encode / pass the NMAS version info?

Thanks!