> Hi All,
>
[quoted text clipped - 18 lines]
> It's the last line where it throws an exception,
> Unable to cast object of type 'System.Byte[]' to type 'System.String'.
So, why is it returning System.Byte[]? What's in that byte array?
I suspect that memberOf has a different meaning to your local machine than
it does to your server.
John
Abhi - 25 Sep 2006 21:35 GMT
John,
You might be right becasue I chnaged my code to accept a byte array and then
convert it to a string as follows,
byte[] byteArray =
(byte[])result.Properties["memberOf"][counter];
string group = "";
foreach (byte t in byteArray)
{
char c = Convert.ToChar(t);
group += c.ToString();
}
and it works fine on the remote server but fails! on my machine throwing an
exception which say unavble to convert a string to byte[].
And to answer your question that byte array converted to string gives me the
group name.
How can I make it work on both machines?
Thanks,
Abhi
> > Hi All,
> >
[quoted text clipped - 25 lines]
>
> John
John Saunders - 25 Sep 2006 23:11 GMT
> John,
>
[quoted text clipped - 22 lines]
>
> How can I make it work on both machines?
This is not a web services question any more. The question is, "why is
memberOf different on these two machines and how can I make it the same or
at least make it look like it's the same".
John
Abhi - 26 Sep 2006 15:39 GMT
Yep, this no longer remains a web service question. Initially I thought it's
the WSDL playing some tricks and not interpreting the returned object
correctly but that doesn't seems to be the case. I don't know a whole lot
about Active Directory or LDAP. Please let me know if there is a similar
discussion forum for active directory services so I can post the right
question.
Thanks for your help
-Abhi
> > John,
> >
[quoted text clipped - 28 lines]
>
> John