Hi.

I try to create an OAB with LDAP and ADSI. I set all these properties:

offLineABContainers
offLineABServer
offlineABSchedule
offlineABStyle
instanceType
doOABVersion
msExchOABFolder
legacyExchangeDN

- and still I only get an:

System.Runtime.InteropServices.COMException (0x8007202F): A constraint
violation occurred.

When I commit the transaction. Below is some of my code (c#):

DirectoryEntry offlineList =
oOfflineAddrListContainer.Children.Add("CN=" + customerDomain, "msExchOAB");
DirectoryEntry sample =
oOfflineAddrListContainer.Children.Find("CN=source.domain.com");

byte[] copiedSchedule =
(byte[])sample.Properties["offlineABSchedule"].Value;

// Properties:
offlineList.Properties["offLineABContainers"].Add("CN=" + customerDomain +
"," + GlobalAdrList);
offlineList.Properties["offLineABServer"].Value = offlineABServer + "," +
defaultNC;
offlineList.Properties["offlineABSchedule"].Add(copiedSchedule);
offlineList.Properties["offlineABStyle"].Value = 1;
offlineList.Properties["instanceType"].Value = 4;
offlineList.Properties["doOABVersion"].Value = 0;
offlineList.Properties["msExchOABFolder"].AddRange(new object[] { 0 });
offlineList.Properties["legacyExchangeDN"].Value =
"/o=ExchangeHotel/cn=addrlists/cn=oabs/cn=" + customerDomain;
offlineList.Properties["systemFlags"].Value = 1610612736;
// offlineList.Properties["siteFolderGUID"].Add(tGUID);
offlineList.Properties["siteFolderServer"].Value = siteFolderServer + "," +
defaultNC;
offlineList.CommitChanges(); // this line fails.


Hope you can help me.


Cheers,
Benny





See More: Problems when creating an Exchange offline address book (OAB)