SqlMembershipProvider - SID or GUID

  • Thread starter msnews.microsoft.com
  • Start date
M

msnews.microsoft.com

Hi gurus,

I have an aspnet web service running under windows integrated security.
When a client calls on my web service, I have access to the authenticated
user's SID from the (this.User.Identity as WindowsIdentity).User.Value
property.

I want to use the SqlMembershipProvider to store Role/User data. The
'aspnet_Users" table defines the user's ID as guid so I can't use SID. How
do I get a Guid from the SID?

Thanks a lot in advance.
 
J

Joe Kaplan \(MVP - ADSI\)

I'm not sure how exactly this fits in with the membership provider, but you
can definitely translate from an AD user's SID to their GUID using the
TranslateName API or the DsCrackNames API. You would call either of them
via p/invoke. You can also do an LDAP query with System.DirectoryServices.

Joe K.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top