Giter Site home page Giter Site logo

Comments (5)

dsbenghe avatar dsbenghe commented on September 25, 2024 2

attribute.StringValues looks to contain what are you looking for.

from novell.directory.ldap.netstandard.

emailtowalter avatar emailtowalter commented on September 25, 2024

It worked! Thanks !

from novell.directory.ldap.netstandard.

aniljain100 avatar aniljain100 commented on September 25, 2024

Hello,

Apologies to invoke this thread. At the first place I am unable to add MemberOf attribute to the user. Its throwing me Ldaperrormessage:

"0000209A: SvcErr: DSID-031A1081, problem 5003 (WILL_NOT_PERFORM), data 0\n\0"

Here is my code:

LdapAttributeSet attributeSet = new LdapAttributeSet();
attributeSet.Add(new LdapAttribute("objectclass", "inetOrgPerson"));
attributeSet.Add(new LdapAttribute("MemberOf",
  new string[] { "CN=Group name,CN=Users,DC=domain name,DC=local" }));
attributeSet.Add(new LdapAttribute("givenname",
       "Anilsnew1"));
attributeSet.Add(new LdapAttribute("sn", "Anilsnew1"));
attributeSet.Add(new LdapAttribute("telephonenumber", "1 801 555 1212"));
attributeSet.Add(new LdapAttribute("mail", "[email protected]"));
//attributeSet.Add(new LdapAttribute("userpassword", "Anilsnew"));

string dn = "cn=Anilsnew1," + containerName;
LdapEntry newEntry = new LdapEntry(dn, attributeSet);
LdapConnection conn = new LdapConnection();
Console.WriteLine("Connecting to:" + ldapHost);
conn.Connect(ldapHost, ldapPort);
conn.Bind(loginDN, password);
conn.Add(newEntry);
Console.WriteLine("Entry:" + dn + "  Added Successfully");

Any idea what's wrong?

Thanks
Anil Jain

from novell.directory.ldap.netstandard.

dsbenghe avatar dsbenghe commented on September 25, 2024

See my answer to your original issue - #21

from novell.directory.ldap.netstandard.

aniljain100 avatar aniljain100 commented on September 25, 2024

Hi,

Thanks. It worked for me as well.

from novell.directory.ldap.netstandard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.