Re: Binding to ADAM with a Windows Account



The book is available online via Safari, not books 24x7. That is the
arrangement the publisher, Addison-Wesley, has and I can't really do
anything to affect that.

Have you considered getting a Safari subscription. :=)

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
--
"Phran" <Phran@xxxxxxxxxxxxxxx> wrote in message
news:0506F9A7-A2FC-4FAE-B4D8-4D682073EF47@xxxxxxxxxxxxxxxx
rJoe, thanks very much for your help. I will look into obtaining you book.
Have you considered adding it to http://www.books24x7.com as I would then
have access.

"Joe Kaplan" wrote:

I'd be very careful with this type of code as it behaves differently
between
..NET 1.x and 2.0 and can throw you for a loop. Generally, I always
recommend using the 4 parameter constructor for DirectoryEntry or always
setting the AuthenticationTypes property.

To bind with a Windows account to ADAM, you must use
AuthenticationTypes.Secure. In .NET 1.x, when you use the single
parameter
constructor and then set the username name password properties
separately,
the AuthenticationTypes will actually be set to None which will then do a
simple bind. You don't want that, as simple bind to ADAM only works with
ADAM accounts (or bindProxy objects).

We cover this topic in more detail in ch 3 of our book.

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
--
"Phran" <Phran@xxxxxxxxxxxxxxx> wrote in message
news:B859438E-1326-4D64-8B17-97D70F10E34C@xxxxxxxxxxxxxxxx
Hi, I have an account dev1\administrator. I can use the account with
adsidedit.exe to bind to an ADAM. However, when I use the account in
code
I
get an "Unknown username or bad password error". My code is:

objADAM = New DirectoryEntry(ldapPath)
objADAM.Username = "dev1" + "\" + "Administrator"
objADAM.Password = "password"
objADAM.RefreshCache()

If I use an ADAM account instead of the windows account I can bind
without
any problem.

Am I making sense?
Can you help?
What else do you need to know?

thanks very much for your time





.



Relevant Pages

  • Re: ADAM / AD Proxy Bind
    ... If you need to create a bunch of bind proxy objects, ... There are more ADAM ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ...
    (microsoft.public.dotnet.security)
  • Re: Binding to ADAM with a Windows Account
    ... To bind with a Windows account to ADAM, ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ...
    (microsoft.public.windows.server.active_directory)
  • Re: Issue while setting user password in ADAM using JAVA
    ... You can make the problem go away by running ADAM as network service instead although perhaps there is a reason why you wanted to use the account you are using. ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ... has sufficient rights to update the serviceConnectionPoint object. ...
    (microsoft.public.windows.server.active_directory)
  • Re: Problem by bind to ADAM Server with DN
    ... if the msDS-UserAccountDisabled is not set then the account is ... ADAM ADSIEdit has a right-click Reset Password for user objects ... If the account exists in ADAM then you will need a simple bind, ... domain account is used then the ADAM instance server must ...
    (microsoft.public.windows.server.active_directory)
  • Re: How Redirect ADAM to AD ?
    ... Bind just authenticates the user. ... ADAM using that user's security context. ... I do not know how you could use those with another LDAP directory. ... Co-author of "The .NET Developer's Guide to Directory Services Programming" ...
    (microsoft.public.windows.server.active_directory)

Loading