Before you go testing this in code, I suggest you try getting this to work
in ldp.exe or ADSI Edit. That way you eliminate any problems with your
code. Both of these tools are available on the Windows server CD under
A couple of other things to watch out for:
- Make sure that your new attribute is in the mayContain list for the class
you are accessing or one of its auxillaries
- Make sure you are referring the attribute by its ldapDisplayName
attribute value (might be the same as CN, might not)
- Make sure you supply a value appropriate to the attribute syntax. For
example, if the attribute is really a DN syntax (184.108.40.206), then you must
supply a valid LDAP distinguished name e.g.
cn=someone,cn=users,dc=mydomain,dc=com. Your code below is not doing that
in this case.
Hopefully that will get you going.
> Hi Joe,
> Thanks for the response.
> Sorry about the error msg. i had posted earlier. Its not
> the actual error, but the error i get is
> "The specified directory service attribute or value does
> not exist.
> Description: An unhandled exception occurred during the
> execution of the current web request. Please review the
> stack trace for more information about the error and where
> it originated in the code.
> Exception Details:
> System.Runtime.InteropServices.COMException: The specified
> directory service attribute or value does not exist."
> Following are the details of the new attribute created
> Attribute Name - Reporting To
> Common Name - RT
> X 500 OID - 1.2.840.1135220.127.116.110.11
> Syntax - Distinguished Name
> Minimum - 0
> Maximum - 500
> and the c# code is
> DirectoryEntry de = DirectoryEntry
> de.Username = "LogonTest";
> de.Password = "test";
> de.Properties["displayName"].Value = "Sample User1";
> de.Properties["RT"].Value = "HRF";
> de = null;
> >-----Original Message-----
> >Can you post your code and tell us more about the
> attributes you added to
> >the schema? Depending on the syntax of the attribute,
> you may not be
> >assigning the value correctly.
> >Joe K.
> >> Hi All,
> >> I have created a new attribute and associated it with
> >> user schema.
> >> But when i try to assign a value to the attribute via
> >> it throws the error while commiting the changes.
> >> "The server is unwilling to process the request.
> >> Description: An unhandled exception occurred during the
> >> execution of the current web request. Please review the
> >> stack trace for more information about the error and
> >> it originated in the code.
> >> Exception Details:
> >> System.Runtime.InteropServices.COMException: The server
> >> unwilling to process the request."
> >> Any help in the context would be of great assistance.
> >> Thanks
> >> anu