CDOEXM.IMailboxStore.CreateMailbox error "An operations error occu

Tech-Archive recommends: Fix windows errors by optimizing your registry



Preface
---------
A program I have developed to automate creation of users in Active
Directory, including creating mail boxes with CDO for Exchange Management
(CDOEXM) no longer works. A COM "An operations error occurred." exception is
thrown when calling CDOEXM.IMailboxStore.CreateMailbox using C# program,
logged on as Administrator.

Identical code worked previously BEFORE various changes including migration
of the domain controller where users are stored, from Windows 2000 to Windows
2003. Exchange 2000 server where mailboxes are created has not changed.

Exception thrown
--------------------

See the end of this message for details on invoking just-in-time (JIT)
debugging instead of this dialog box.

************** Exception Text **************
System.Runtime.InteropServices.COMException (0x80072020): An operations
error occurred.
at CDOEXM.IMailboxStore.CreateMailbox(String HomeMDBURL)
at
nz.govt.LandTransport.Web.Mail.ExchangeMailBoxController.AddMailBox(DirectoryEntry deUserDirectoryEntry, ExchangeMailBox MailBox)
at TestCreateExchangeMailBox.MainForm.AddMailBox(DirectoryEntry
directoryEntry, ADUser User)
at TestCreateExchangeMailBox.MainForm.MakeMailBoxButton_Click(Object
sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)

Code that results in exception (note password is set to '****' for privacy)
------------------------------------------------------------------------------------

using System.DirectoryServices;
using CDOEXM;

DirectoryEntry directoryEntry = null;

DirectoryEntry Entry = new
DirectoryEntry("LDAP://trc-dc1/cn=Users,DC=trc,DC=ltsa,DC=govt,DC=nz";,
@"TRC\Administrator", "****", AuthenticationTypes.Secure);
DirectorySearcher Searcher = new DirectorySearcher();

Searcher.SearchRoot = Entry;
Searcher.Filter = "(&(objectcategory=user)(sAMAccountname=BrittanyS))";
SearchResult searchResult = Searcher.FindOne();

if(searchResult != null)
{
directoryEntry = searchResult.GetDirectoryEntry();

string HomeMDB = "CN=TRC Store,CN=Transport Registry
Centre,CN=InformationStore,CN=TRC-MAIL,CN=Servers,CN=Head
Office,CN=Administrative

Groups,CN=LTSA,CN=Microsoft
Exchange,CN=Services,CN=Configuration,DC=ltsa,DC=govt,DC=nz";

CDOEXM.IMailboxStore ExchangeMailbox = (IMailboxStore)
directoryEntry.NativeObject;

ExchangeMailbox.CreateMailbox(HomeMDB);

directoryEntry.CommitChanges();
}

Investigation results
-----------------------

1. Confirmed the HomeMDB string in the code example passed to
CDOEXM.IMailboxStore.CreateMail is identical to value that previously worked
before change to Windows 2003 Domain controller.

2. Confirmed the HomeMDB string in the code example matches the "homemdb"
property for an Active Directory user with a current mailbox.

3. Google search under various keywords turned up several newsgroup articles
describing same or similar problem but no solution found.

4. Attempted to create mail box with same C# program on other domain
controller (same parameters as TRC-DC1 except has System Management tools
installed)with same exception.

Development Environment
------------------------------

Visual Studio .NET Enterprise architect using .NET Framework 1.1.

Active Directory Environment
---------------------------------

Windows Server 2003 Enterprise Edition SP1 running as Domain Controller
(host name TRC-DC1 as used in code).

Exchange Environment
--------------------------

Windows 2000 Advanced Server SP4, member server (host name TRC-MAIL as used
in code).

TEST AND PRODUCTION ENVIRONMENTS
-----------------------------------------------

Windows 2000 Advanced Server SP4

Logged on as TRC\Administrator (Administrator user has full rights in our
environment). Code run from .NET windows forms executable.

CDOEXM.dll version in C:\Program Files\Exchsrvr\BIN\CDOEXM.DLL on
test/production servers is 6.0.4417.0.

SOFTWARE:

MS Exchange 2000 System Management Tools
Windows 2000 Hot fix for Active Directory Services (See KB: 835763).
MS .NET Framework 1.1 Hotfix (KB886903).
..NET Framework 1.1
ADSI 2.5 Resource kit (installed for unrelated code that sets folder
permissions for Active Directory Users).
Windows 2000 hotfix KB835763
Windows 2000 hotfix KB842773
Windows 2000 hotfix KB883939
Windows 2000 hotfix KB890046
Windows 2000 hotfix KB893756
Windows 2000 hotfix KB894320
Windows 2000 hotfix KB896358
Windows 2000 hotfix KB896422
Windows 2000 hotfix KB896423
Windows 2000 hotfix KB896727
Windows 2000 hotfix KB899587
Windows 2000 hotfix KB899588
Windows 2000 hotfix KB899591
Windows 2000 hotfix KB901214
.


Quantcast