|
server
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Adding USER in AdamLittle confused about adding users in ADAM. I am able to add users to ADAM using the following code and the class "user" AuthTypes = AuthenticationTypes.Signing | AuthenticationTypes.Sealing | AuthenticationTypes.Secure; DirectoryEntry verifiedUser = new DirectoryEntry("LDAP://"+serverName+":"+portNumber+"/"+partitionDir,"username","password",AuthTypes); verifiedUser.RefreshCache(); strUserName = "CN=testUser"; try { objUser = verifiedUser.Children.Add(strUserName,"user"); objUser.CommitChanges(); } But I want to use users to a differnt class say "publicPerson", this class is already there but when I say the following it gives an error. objUser = verifiedUser.Children.Add(strUserName,"publicPerson"); objUser.CommitChanges(); Error: Server Error in '/ADAM' Application. -------------------------------------------------------------------------------- The requested operation did not satisfy one or more constraints associated with the class of the object. 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 requested operation did not satisfy one or more constraints associated with the class of the object. Any help would be appreciated. Thanks, I'm not familiar with the schema definition for the "publicPerson" class,
but is it possible that it defines some "mustContain" attributes that need to be specified at create time? It might also be the case that it does not use CN as the RDN Attribute, so you would not specify the name as "CN=xxxx". You need to tell us more about this schema class if you want more specific help. Joe K. Show quoteHide quote "adam" <kumar***@gmail.com> wrote in message news:1141923200.192967.184710@z34g2000cwc.googlegroups.com... > Hi All, > > Little confused about adding users in ADAM. > I am able to add users to ADAM using the following code and the class > "user" > > AuthTypes = AuthenticationTypes.Signing | AuthenticationTypes.Sealing | > AuthenticationTypes.Secure; > > DirectoryEntry verifiedUser = new > DirectoryEntry("LDAP://"+serverName+":"+portNumber+"/"+partitionDir,"username","password",AuthTypes); > > verifiedUser.RefreshCache(); > > strUserName = "CN=testUser"; > try > { > objUser = verifiedUser.Children.Add(strUserName,"user"); > objUser.CommitChanges(); > } > > But I want to use users to a differnt class say "publicPerson", this > class is already there but when I say the following it gives an error. > > objUser = verifiedUser.Children.Add(strUserName,"publicPerson"); > objUser.CommitChanges(); > > Error: > > Server Error in '/ADAM' Application. > -------------------------------------------------------------------------------- > > The requested operation did not satisfy one or more constraints > associated with the class of the object. > 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 > requested operation did not satisfy one or more constraints associated > with the class of the object. > > > Any help would be appreciated. > Thanks, > Hi
a likely cause of your probelm is that you are you are not specifying a required (mandatory) attribute of the class that you are trying to instantiate or that you have a containment violation and the class you are trying to instantiate cannot be a child of the parent container you are specifying. It's difficult to be more specific without knowing what the classSchema "publicPerson" definition is. Also for System.DirectoryServices questions it usually a better idea to post to the adsi.general newsgroup. Lee Flight Show quoteHide quote "adam" <kumar***@gmail.com> wrote in message news:1141923200.192967.184710@z34g2000cwc.googlegroups.com... > Hi All, > > Little confused about adding users in ADAM. > I am able to add users to ADAM using the following code and the class > "user" > > AuthTypes = AuthenticationTypes.Signing | AuthenticationTypes.Sealing | > AuthenticationTypes.Secure; > > DirectoryEntry verifiedUser = new > DirectoryEntry("LDAP://"+serverName+":"+portNumber+"/"+partitionDir,"username","password",AuthTypes); > > verifiedUser.RefreshCache(); > > strUserName = "CN=testUser"; > try > { > objUser = verifiedUser.Children.Add(strUserName,"user"); > objUser.CommitChanges(); > } > > But I want to use users to a differnt class say "publicPerson", this > class is already there but when I say the following it gives an error. > > objUser = verifiedUser.Children.Add(strUserName,"publicPerson"); > objUser.CommitChanges(); > > Error: > > Server Error in '/ADAM' Application. > -------------------------------------------------------------------------------- > > The requested operation did not satisfy one or more constraints > associated with the class of the object. > 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 > requested operation did not satisfy one or more constraints associated > with the class of the object. > > > Any help would be appreciated. > Thanks, > Another possible problem -- publicPerson class definition needs to list the
class of partitionDir (container? organizationalUnit?) as one of its possSuperiors. -- Show quoteHide quoteDmitri Gavrilov SDE, DS Admin eXperience This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm "Lee Flight" <l**@le.ac.uk-nospam> wrote in message news:uHFaR$7QGHA.196@TK2MSFTNGP10.phx.gbl... > Hi > > a likely cause of your probelm is that you are you are not specifying > a required (mandatory) attribute of the class that you are trying to > instantiate > or that you have a containment violation and the class you are trying to > instantiate cannot be a child of the parent container you are specifying. > It's difficult to be more specific without knowing what the classSchema > "publicPerson" definition is. > > Also for System.DirectoryServices questions it usually a better idea to > post to the adsi.general newsgroup. > > Lee Flight > > "adam" <kumar***@gmail.com> wrote in message > news:1141923200.192967.184710@z34g2000cwc.googlegroups.com... >> Hi All, >> >> Little confused about adding users in ADAM. >> I am able to add users to ADAM using the following code and the class >> "user" >> >> AuthTypes = AuthenticationTypes.Signing | AuthenticationTypes.Sealing | >> AuthenticationTypes.Secure; >> >> DirectoryEntry verifiedUser = new >> DirectoryEntry("LDAP://"+serverName+":"+portNumber+"/"+partitionDir,"username","password",AuthTypes); >> >> verifiedUser.RefreshCache(); >> >> strUserName = "CN=testUser"; >> try >> { >> objUser = verifiedUser.Children.Add(strUserName,"user"); >> objUser.CommitChanges(); >> } >> >> But I want to use users to a differnt class say "publicPerson", this >> class is already there but when I say the following it gives an error. >> >> objUser = verifiedUser.Children.Add(strUserName,"publicPerson"); >> objUser.CommitChanges(); >> >> Error: >> >> Server Error in '/ADAM' Application. >> -------------------------------------------------------------------------------- >> >> The requested operation did not satisfy one or more constraints >> associated with the class of the object. >> 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 >> requested operation did not satisfy one or more constraints associated >> with the class of the object. >> >> >> Any help would be appreciated. >> Thanks, >> > >
Domain controller server planning
snmp Admin login as user Replication Adding a local computer account into AD Windows 2000 server with xp clients access to Server 2K3 Starting a forest over from stratch folder redirection, moving to new folders Want to create homefolder for users, but get error about create ac |
|||||||||||||||||||||||