Thanks for replying I am including the code for your reference please check and let me know the cause for error
sFirstName="abc";
sLastName="def";
sMailId="abc.def"
sPassword="abc1234";
strFullName=sFirstName+" "+sLastName;
string domain = "LDAP://192.168.5.62/OU=newusers,DC=xxx,DC=com";
DirectoryEntry dirEntry = new DirectoryEntry(domain, "username", "password", AuthenticationTypes.Secure);
sAccountName = sFirstName + "." + sLastName;
DirectoryEntry newUser = dirEntry.Children.Add("CN=" + sMailId, "user");
newUser.Properties["givenname"].Add(strFirstname);
newUser.Properties["sn"].Add(strLastName);
string strFullName = textInfo.ToTitleCase(sMailId);
newUser.Properties["displayName"].Add(strFullName);
newUser.Properties["SAMAccountName"].Add(sAccountName);
newUser.Properties["userPrincipalName"].Add(sAccountName+"@aaa.com");
newUser.Properties["submissionContLength"].Add(5500);
newUser.Properties["delivContLength"].Add(5500);
newUser.CommitChanges();
EnableUserAccount(newUser);
newUser.Invoke("SetPassword", new object[] { sPassword });
newUser.CommitChanges();
System.Threading.Thread.Sleep(10000);
//Till here working fine...
string homeMDB = "CN=Mailbox Store(MAILBOX),CN=First Storage Group,CN=InformationStore,CN=MAILBOX,CN=Servers,CN=First Administrative Group,CN=Administrative Groups,CN=xxxxx,CN=Microsoft Exchange,CN=Services,CN=Configuration,DC=xxxx,DC=com";
CDOEXMailBox = (IMailboxStore)newUser.NativeObject;
CDOEXMailBox.CreateMailbox(homeMDB);//Getting error at this stage
newUser.CommitChanges();
192.168.5.62=Server where Activer Directory is installed
MAILBOX(192.168.5.60)=Server where Exchange server is installed..my application also hosted on this server
please note that we have installed Active Directory and Exchange server installed on two different machines.