|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
System.DirectoryServices.ActiveDirectory.ApplicationPartition constructorconstructor for ApplicationPartition in System.DirectoryServices.ActiveDirectory namespace. It works fine if I use a distinguished name like "DC=mycompany,DC=com" but anything other than 2 DC= causes the constructor to throw an exception: "The specified distinguished name has an invalid format". I have also tried using one of my custom class names in the constructor with 3 parameters, instead of defaulting to the default domainDNS, but still the same exception. If I create a new application partition when I create the ADAM instance using the wizard I can specify something like "CN=myapp" which is exactly what I want - I don't need the domain stuff in the distinguished name - except I want to create the partition programmatically. This is currently running on XP. Hi
posting your code to the adsi.general NG would probably be best. I suspect the problem is that the ApplicationPartition class is designed for AD Application Partitions (inherently domainDNS objects) http://msdn.microsoft.com/library/en-us/ad/ad/application_directory_partitions.asp which are quite different from ADAM partitions. Lee Flight Show quote "richlm" <richlm@nospam.nospam> wrote in message news:uFvqMTsIGHA.1088@tk2msftngp13.phx.gbl... >I am creating a new application partition in ADAM using the .NET framework >constructor for ApplicationPartition in >System.DirectoryServices.ActiveDirectory namespace. > > It works fine if I use a distinguished name like "DC=mycompany,DC=com" but > anything other than 2 DC= causes the constructor to throw an exception: > "The specified distinguished name has an invalid format". > > I have also tried using one of my custom class names in the constructor > with 3 parameters, instead of defaulting to the default domainDNS, but > still the same exception. > > If I create a new application partition when I create the ADAM instance > using the wizard I can specify something like "CN=myapp" which is exactly > what I want - > I don't need the domain stuff in the distinguished name - except I want to > create the partition programmatically. > > This is currently running on XP. > > Thanks Lee for your response and the link.
Yes it sounds like an applciation partition is a special kind of DomainDNS. I guess that makes sense in an AD context, but not so much when using ADAM purely as a heirarchical database. Never mind, I guess we can live with it. Anyone on the ADSI group have comments to add? Show quote "Lee Flight" <l**@le.ac.uk-nospam> wrote in message news:etH$vgsIGHA.648@TK2MSFTNGP14.phx.gbl... > Hi > > posting your code to the adsi.general NG would probably be best. > I suspect the problem is that the ApplicationPartition class is designed > for AD Application Partitions (inherently domainDNS objects) > > http://msdn.microsoft.com/library/en-us/ad/ad/application_directory_partitions.asp > > which are quite different from ADAM partitions. > > Lee Flight > > > > "richlm" <richlm@nospam.nospam> wrote in message > news:uFvqMTsIGHA.1088@tk2msftngp13.phx.gbl... >>I am creating a new application partition in ADAM using the .NET framework >>constructor for ApplicationPartition in >>System.DirectoryServices.ActiveDirectory namespace. >> >> It works fine if I use a distinguished name like "DC=mycompany,DC=com" >> but anything other than 2 DC= causes the constructor to throw an >> exception: >> "The specified distinguished name has an invalid format". >> >> I have also tried using one of my custom class names in the constructor >> with 3 parameters, instead of defaulting to the default domainDNS, but >> still the same exception. >> >> If I create a new application partition when I create the ADAM instance >> using the wizard I can specify something like "CN=myapp" which is exactly >> what I want - >> I don't need the domain stuff in the distinguished name - except I want >> to create the partition programmatically. >> >> This is currently running on XP. >> >> > > Thanks Lee for your response and the link.
Yes it sounds like an applciation partition is a special kind of DomainDNS. I guess that makes sense in an AD context, but not so much when using ADAM purely as a heirarchical database. Never mind, I guess we can live with it. Anyone on the ADSI group have comments to add? Show quote "Lee Flight" <l**@le.ac.uk-nospam> wrote in message news:etH$vgsIGHA.648@TK2MSFTNGP14.phx.gbl... > Hi > > posting your code to the adsi.general NG would probably be best. > I suspect the problem is that the ApplicationPartition class is designed > for AD Application Partitions (inherently domainDNS objects) > > http://msdn.microsoft.com/library/en-us/ad/ad/application_directory_partitions.asp > > which are quite different from ADAM partitions. > > Lee Flight > > > > "richlm" <richlm@nospam.nospam> wrote in message > news:uFvqMTsIGHA.1088@tk2msftngp13.phx.gbl... >>I am creating a new application partition in ADAM using the .NET framework >>constructor for ApplicationPartition in >>System.DirectoryServices.ActiveDirectory namespace. >> >> It works fine if I use a distinguished name like "DC=mycompany,DC=com" >> but anything other than 2 DC= causes the constructor to throw an >> exception: >> "The specified distinguished name has an invalid format". >> >> I have also tried using one of my custom class names in the constructor >> with 3 parameters, instead of defaulting to the default domainDNS, but >> still the same exception. >> >> If I create a new application partition when I create the ADAM instance >> using the wizard I can specify something like "CN=myapp" which is exactly >> what I want - >> I don't need the domain stuff in the distinguished name - except I want >> to create the partition programmatically. >> >> This is currently running on XP. >> >> > > Well, technically the word Application Partition refers to an AD feature
(that almost no one uses), not ADAM, so this kind of makes sense. In a sense, all partitions in ADAM are "application partitions", but we don't refer to them with the same language. As such, I chaulk this up to pickiness over how things are named, but perhaps the ApplicationPartition class has some properties that only make sense for a real AD application partition and would not map to ADAM? I haven't looked that closely yet. Joe K. Show quote "richlm" <richlm@nospam.nospam> wrote in message news:uuTyzUEJGHA.3696@TK2MSFTNGP15.phx.gbl... > Thanks Lee for your response and the link. > Yes it sounds like an applciation partition is a special kind of > DomainDNS. > I guess that makes sense in an AD context, but not so much when using ADAM > purely as a heirarchical database. Never mind, I guess we can live with > it. > > Anyone on the ADSI group have comments to add? > > "Lee Flight" <l**@le.ac.uk-nospam> wrote in message > news:etH$vgsIGHA.648@TK2MSFTNGP14.phx.gbl... >> Hi >> >> posting your code to the adsi.general NG would probably be best. >> I suspect the problem is that the ApplicationPartition class is designed >> for AD Application Partitions (inherently domainDNS objects) >> >> http://msdn.microsoft.com/library/en-us/ad/ad/application_directory_partitions.asp >> >> which are quite different from ADAM partitions. >> >> Lee Flight >> >> >> >> "richlm" <richlm@nospam.nospam> wrote in message >> news:uFvqMTsIGHA.1088@tk2msftngp13.phx.gbl... >>>I am creating a new application partition in ADAM using the .NET >>>framework constructor for ApplicationPartition in >>>System.DirectoryServices.ActiveDirectory namespace. >>> >>> It works fine if I use a distinguished name like "DC=mycompany,DC=com" >>> but anything other than 2 DC= causes the constructor to throw an >>> exception: >>> "The specified distinguished name has an invalid format". >>> >>> I have also tried using one of my custom class names in the constructor >>> with 3 parameters, instead of defaulting to the default domainDNS, but >>> still the same exception. >>> >>> If I create a new application partition when I create the ADAM instance >>> using the wizard I can specify something like "CN=myapp" which is >>> exactly what I want - >>> I don't need the domain stuff in the distinguished name - except I want >>> to create the partition programmatically. >>> >>> This is currently running on XP. >>> >>> >> >> > > Well, technically the word Application Partition refers to an AD feature
(that almost no one uses), not ADAM, so this kind of makes sense. In a sense, all partitions in ADAM are "application partitions", but we don't refer to them with the same language. As such, I chaulk this up to pickiness over how things are named, but perhaps the ApplicationPartition class has some properties that only make sense for a real AD application partition and would not map to ADAM? I haven't looked that closely yet. Joe K. Show quote "richlm" <richlm@nospam.nospam> wrote in message news:uuTyzUEJGHA.3696@TK2MSFTNGP15.phx.gbl... > Thanks Lee for your response and the link. > Yes it sounds like an applciation partition is a special kind of > DomainDNS. > I guess that makes sense in an AD context, but not so much when using ADAM > purely as a heirarchical database. Never mind, I guess we can live with > it. > > Anyone on the ADSI group have comments to add? > > "Lee Flight" <l**@le.ac.uk-nospam> wrote in message > news:etH$vgsIGHA.648@TK2MSFTNGP14.phx.gbl... >> Hi >> >> posting your code to the adsi.general NG would probably be best. >> I suspect the problem is that the ApplicationPartition class is designed >> for AD Application Partitions (inherently domainDNS objects) >> >> http://msdn.microsoft.com/library/en-us/ad/ad/application_directory_partitions.asp >> >> which are quite different from ADAM partitions. >> >> Lee Flight >> >> >> >> "richlm" <richlm@nospam.nospam> wrote in message >> news:uFvqMTsIGHA.1088@tk2msftngp13.phx.gbl... >>>I am creating a new application partition in ADAM using the .NET >>>framework constructor for ApplicationPartition in >>>System.DirectoryServices.ActiveDirectory namespace. >>> >>> It works fine if I use a distinguished name like "DC=mycompany,DC=com" >>> but anything other than 2 DC= causes the constructor to throw an >>> exception: >>> "The specified distinguished name has an invalid format". >>> >>> I have also tried using one of my custom class names in the constructor >>> with 3 parameters, instead of defaulting to the default domainDNS, but >>> still the same exception. >>> >>> If I create a new application partition when I create the ADAM instance >>> using the wizard I can specify something like "CN=myapp" which is >>> exactly what I want - >>> I don't need the domain stuff in the distinguished name - except I want >>> to create the partition programmatically. >>> >>> This is currently running on XP. >>> >>> >> >> > > |
|||||||||||||||||||||||