accessing new attributes in user schema

accessing new attributes in user schema

Post by Anu » Tue, 01 Jul 2003 19:09:05



Hi All,

I have created a new attribute and associated it with the
user schema.

But when i try to assign a value to the attribute via code
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 where
it originated in the code.

Exception Details:
System.Runtime.InteropServices.COMException: The server is
unwilling to process the request."

Any help in the context would be of great assistance.

Thanks
anu

 
 
 

accessing new attributes in user schema

Post by MVP - ADS » Tue, 01 Jul 2003 23:26:45


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.


Quote:> Hi All,

> I have created a new attribute and associated it with the
> user schema.

> But when i try to assign a value to the attribute via code
> 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 where
> it originated in the code.

> Exception Details:
> System.Runtime.InteropServices.COMException: The server is
> unwilling to process the request."

> Any help in the context would be of great assistance.

> Thanks
> anu


 
 
 

accessing new attributes in user schema

Post by Anu » Wed, 02 Jul 2003 13:49:21


Hi,

Following are the attribute details

Attribute Name - "ReportingTo"
Common Nmae

Quote:>-----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
the
>> user schema.

>> But when i try to assign a value to the attribute via
code
>> 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
where
>> it originated in the code.

>> Exception Details:
>> System.Runtime.InteropServices.COMException: The server
is
>> unwilling to process the request."

>> Any help in the context would be of great assistance.

>> Thanks
>> anu

>.

 
 
 

accessing new attributes in user schema

Post by Anu » Wed, 02 Jul 2003 13:56:04


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."

CODE

______________________________________________________

Following are the details of the new attribute created

Attribute Name  -       Reporting To
Common Name     -       RT
X 500 OID       -       1.2.840.113556.1.4.770.11
Syntax          -       Distinguished Name
Minimum         -       0
Maximum         -       500

and the c# code is

DirectoryEntry de = DirectoryEntry
("LDAP://Empower/cn=SampleUser1,cn=Users,dc=empower,dc=loca
l");
de.Username = "LogonTest";
de.Password = "test";

de.Properties["displayName"].Value = "Sample User1";
de.Properties["RT"].Value = "HRF";

de.CommitChanges()
de = null;              
__________________________________________________________

Quote:>-----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
the
>> user schema.

>> But when i try to assign a value to the attribute via
code
>> 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
where
>> it originated in the code.

>> Exception Details:
>> System.Runtime.InteropServices.COMException: The server
is
>> unwilling to process the request."

>> Any help in the context would be of great assistance.

>> Thanks
>> anu

>.

 
 
 

accessing new attributes in user schema

Post by MVP - ADS » Thu, 03 Jul 2003 00:43:33


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
support tools.

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 (2.5.5.1), 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.

Joe K.


> 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."

> CODE

> ______________________________________________________

> Following are the details of the new attribute created

> Attribute Name  - Reporting To
> Common Name - RT
> X 500 OID - 1.2.840.113556.1.4.770.11
> Syntax - Distinguished Name
> Minimum - 0
> Maximum - 500

> and the c# code is

> DirectoryEntry de = DirectoryEntry
> ("LDAP://Empower/cn=SampleUser1,cn=Users,dc=empower,dc=loca
> l");
> de.Username = "LogonTest";
> de.Password = "test";

> de.Properties["displayName"].Value = "Sample User1";
> de.Properties["RT"].Value = "HRF";

> de.CommitChanges()
> 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
> the
> >> user schema.

> >> But when i try to assign a value to the attribute via
> code
> >> 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
> where
> >> it originated in the code.

> >> Exception Details:
> >> System.Runtime.InteropServices.COMException: The server
> is
> >> unwilling to process the request."

> >> Any help in the context would be of great assistance.

> >> Thanks
> >> anu

> >.

 
 
 

1. Accessing OU attributes and User attributes

I need help in getting OU attributes and User Attributes
in a single pass.  What I am looking to do is write out a
file that contains the OU name and the sAMAccountName
from the user class.

Does anyone have any suggestions?

Thanks in Advance,
Fred

2. D-3... / J-3...

3. trying to create a new schema attribute via adsi/asp

4. Commodore tech support

5. How Add Schema Attribute to Schema Class?

6. Battery

7. list of al the possible attributes of the class user in the schema

8. Share room at STACS

9. Access obj-user attribute via ADSI

10. Schema Extending.. Attribute

11. ADSI Schema Attributes

12. retrieving extended schema attributes using ADSI

13. Schema attributes of AD are missing in .NET beta3 using ADSI