
May 8th, 2008, 07:23 PM
|
|
Registered User
|
|
Join Date: May 2008
Posts: 1
Time spent in forums: 1 m 14 sec
Reputation Power: 0
|
|
|
Add Auxiliary SchemaClass problem (.NET2.0)
What I am trying to accomplish is to create an auxiliary schema class to the "user" schema class and create a user with the properties I have added to the auxiliary class. Once I save the new schema class to the ADAM schema, it automatically becomes an auxiliary class to the "user" schema class. However, this is not true. Whenever I try to assign a value to these new properties I get a constraints error. I am unable to set my new properties after creating a user, unless I go into the ADAM Schema MMC snap-in and explicitly add this new class as to the auxiliary classes of "user". When I try to add "contosoClass" to the auxiliaryClasses collection in my code, however, I get an error that "contosoClass" already exists in "user".auxiliaryClasses. I am able to verify this by iterating the auxiliaryClasses collectin of "user". I am unable to remove "contosoClass" from the AuxiliaryClasses collection of "user" schema class programatically with an error of some super class inheritance.
What I have done is installed an ADAM SP1 instance and created a ActiveDirectorySchemaClass below.
adsSchemaClass.CommonName = "contosoClass"
adsSchemaClass.Description = "my class"
adsSchemaClass.Oid = {oid}
adsSchemaClass.SchemaGuid = {guid}
adsSchemaClass.SubClassOf = "top"
adsSchemaClass.Type = Auxiliary
adsSchemaClass.OptionalProperties.Add("contosoProp1")
adsSchemaClass.OptionalProperties.Add("contosoProp2")
adsSchemaClass.OptionalProperties.Add("contosoProp3")
adsSchemaClass.SAVE
Any ideas?
Chris
|