salut tous le monde
je veux creer une boite reception avec Asp.net/C# j'ai trouvé une solution mais il ya une erreur que j'ai pas pu comprendre svp je veux savoir si qlq'un peut m'aider
Merci
le code :
-----------------------------------------------------------------------------
DirectoryEntry dom = new DirectoryEntry("LDAP://cn=users,DC=ISLAH,DC=com","administrateur","mahcih");
///////////DirectoryEntry dom = new DirectoryEntry(adPath,AdUser,Pass);
//DirectoryEntry ou = dom.Children.Find("OU=Educ");
//ou=ou.Children.Find("OU="+strOU);
// Use the Add method to add a user in an organizational unit.
DirectoryEntry usr = dom.Children.Add("CN="+login,"user");
// Set the samAccountName, then commit changes to the directory.
usr.Properties["samAccountName"].Add(login);
usr.CommitChanges();
usr.Invoke("SetPassword", new object [] {login});
usr.Properties["userAccountControl"].Value = 0x0200;
usr.CommitChanges();
mailbox = (IMailboxStore)usr.NativeObject;
mailbox.CreateMailbox(homeMDB);
usr.CommitChanges();
-----------------------------------------------------------------------------
et l'erreur :
-----------------------------------------------------------------------------
Server Error in '/intranet' Application.
--------------------------------------------------------------------------------
Défaillance irrémédiable
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: Défaillance irrémédiable
Source Error:
Line 97:
Line 98: mailbox = (IMailboxStore)usr.NativeObject;
Line 99: mailbox.CreateMailbox(homeMDB);
Line 100: usr.CommitChanges();
Line 101:
-----------------------------------------------------------------------------