Directory Programming .NET

Active Directory and ADAM programming support for .NET developers
Welcome to Directory Programming .NET Sign in | Join | Help
in Search

Is a domain credential required if using SDS.P with ADAM?

Last post 08-20-2008, 2:08 AM by joe. 1 replies.
Sort Posts: Previous Next
  •  08-19-2008, 5:15 PM 4458

    Is a domain credential required if using SDS.P with ADAM?

    In looking through the code samples for using SDS.P when connecting to an ADAM instance, it looks like it requires a NetworkCredential to be used as input to the LdapConnection. Example:

     

    //create an LDAP connection to the server

    connection = new LdapConnection(ldapServerName);

    connection.Credential = new NetworkCredential(userName, password, domainName);

    This NetworkCredential requires a user name and password on a domain. But in my case, I cannot use domain credentials as my Adam instance is in the DMZ. Is there a way to use a NetworkCredential where the username and password is a local Adam user account? If there is a way to do this, how would this be done?

    Thanks for any information on this.

    -Dave Herrmann

  •  08-20-2008, 2:08 AM 4460 in reply to 4458

    Re: Is a domain credential required if using SDS.P with ADAM?

    The domain parameter is optional for NetworkCredential in general.  As to whether you should use it or not depends on the type of authentication you are doing and the format of the username you are using.

    With Negotiate authentication (the default), you generally want to specify the domain parameter.  Use the machine name for a local machine account. If you specify the UPN of an AD user (user@domain.com), then you leave the domain blank.

    ADAM users don't have domains, so you generally don't use the domain parameter for them but instead use one of the bindable username attributes (distinguishedName, displayName or userPrincipalName) in the user name parameter.

    I hope that helps.

View as RSS news feed in XML