|
|
|
date: Tue, 12 Feb 2008 13:49:29 -0800 (PST),
group: microsoft.public.dotnet.security
back
Re: LDAP for Windows XP
I'd suggest doing a p/invoke of the LogonUser API. This is probably the
best way and will work with either type of account (domain or local).
The PrincipalContext object in .NET 3.5 can authenticate users in AD, ADAM
or SAM (local machine), but I've heard reports that the SAM support
sometimes provides mysterious results.
You can also try using the WinNT provider for S.DS instead of LDAP, but I
don't know if that will work reliably either.
Joe K.
--
Joe Kaplan-MS MVP Directory Services Programming
Co-author of "The .NET Developer's Guide to Directory Services Programming"
http://www.directoryprogramming.net
--
"mag" wrote in message
news:223bc52b-9f58-43e2-aea9-99bf2eedc038@v4g2000hsf.googlegroups.com...
On Feb 12, 10:14 pm, "Joe Kaplan"
wrote:
> Are you trying to authenticate a user in Active Directory or on the local
> machine? You can't authenticate local machine users with LDAP.
>
> Joe K.
>
> --
> Joe Kaplan-MS MVP Directory Services Programming
> Co-author of "The .NET Developer's Guide to Directory Services
> Programming"http://www.directoryprogramming.net
> --"mag" wrote in message
>
> news:c0731512-92da-4959-8c44-0304be0d6fd2@e10g2000prf.googlegroups.com...
>
>
>
> > Hi,
>
> > I have a windows application that requires security login and I would
> > like to retrieve the windows XP user ID and Password to compare it
> > with their entries to the application. Any help would be very much
> > appreciated due to short deadline. I do not think I have the right
> > LDAP for XP.
>
> > Some of my code:
>
> > Dim sRoot As String = "LDAP://"
>
> > _windowsLogin = Me.txtUserID.Text
> > _windowsPswd = Me.txtPassword.Text
>
> > Dim objRootEntry As DirectoryEntry = New DirectoryEntry(sRoot,
> > _windowsLogin, _windowsPswd, AuthenticationTypes.Secure)
>
> > Thanks,
>
> > Mag- Hide quoted text -
>
> - Show quoted text -
Thanks for your response,
I am actually trying to uthenticate the user of a local machine. Is
there a way to do that?
date: Wed, 13 Feb 2008 13:17:15 -0600
author: Joe Kaplan
|
|