When using the AD Membership provider, I access the users objectSID using:
Dim mu As MembershipUser = Membership.GetUser(Username, True)
Dim objectSID As Guid = New Guid(mu.ProviderUserKey.ToString)
The problem is that I get the error message:
Guid should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).
?mu.ProviderUserKey.ToString
"S-1-5-21-3444464302-3429344031-2204545056-110765"
It seems that active directory doesnt save the provider key as a guid. Is this correct?
...
Go to the complete details ...