You're not the only one! I have the same problem. Has
anyone figured out the problem?

>
> I am trying to implement code to automatically create a
> mailbox for existing users. I am using code found on
> http://support.microsoft.com/?kbid=313114
>
> When I try to run the code from my aspx application I get
> a Catastrophic Failure!
>
> My code is below:
>
> string homeMDB = "path to store"; //I know this works
> because I have tested the path in a VBScript application
> that successfully creates mailboxes. CDOEXM.IMailboxStore
> mailbox; DirectoryEntry de = new DirectoryEntry("path to
> objects in AD"); //This works as I can successfully
> retrieve user info DirectoryEntry usr;
> DirectorySearcher src = new
> DirectorySearcher("(&(objectCategory=Person)(objectClass=u
> ser)(samAccountName=" + samAccountName + "))");
> //samAccountName is read in as a parameter
>
> src.SearchRoot = de;
> src.SearchScope = SearchScope.Subtree;
> SearchResult result = src.FindOne();
> usr = result.GetDirectoryEntry();
> usr.Properties["userAccountControl"].Value = 0x200;
> usr.CommitChanges();
>
> mailbox = (IMailboxStore)usr.NativeObject;
> mailbox.CreateMailbox(homeMDB); //THIS IS THE ROW WHERE
> MY CODE FAILS WITH ERROR MESSAGE BELOW usr.CommitChanges()
> ;
>
> My error code is:
>
> Catastrophic failure
> 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: Catastrophic
> failure
>
> Source Error:
>
> Line 48:
> Line 49: mailbox =
> (IMailboxStore)usr.NativeObject; Line 50:
> mailbox.CreateMailbox(homeMDB); Line 51:
> usr.CommitChanges(); Line 52:
>
> Source File:
> \\servername\c$\inetpub\wwwroot\appname\creatembx.aspx.cs
> Line: 50
>
> Stack Trace:
>
> [COMException (0x8000ffff): Catastrophic failure]
> CDOEXM.IMailboxStore.CreateMailbox(String HomeMDBURL)
> +0
> zap.WebForm1.Page_Load(Object sender, EventArgs e) in
> \\servername\c$\inetpub\wwwroot\appname\creatembx.aspx.cs
> :50
> System.Web.UI.Control.OnLoad(EventArgs e) +67
> System.Web.UI.Control.LoadRecursive() +35
> System.Web.UI.Page.ProcessRequestMain() +731
>
> Thanks for you help!
>
> /hass