473,396 Members | 1,871 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

CDOEXM.IMailboxStore.CreateMailbox Error

Hi,

I am trying to create a exchange mailbox-enabled user on Exchange Server
2003 via w ASP.NET web applcation (written in C#). I can create the user
successfully but when I try to create the mailbox I get the following
exception:

System.Runtime.InteropServices.COMException (0x8000FFFF): Catastrophic
failure at CDOEXM.IMailboxStore.CreateMailbox(String HomeMDBURL)

I used to be able to do this fine with Exchange 2000.

My code is:

string mailboxStore =
ConfigurationSettings.AppSettings["email.exchange.mailboxstore"];
string storageGroup =
ConfigurationSettings.AppSettings["email.exchange.storagegroup"];
string server = ConfigurationSettings.AppSettings["email.exchange.server"];
string organisation =
ConfigurationSettings.AppSettings["email.exchange.organisation"];
string dom = ConfigurationSettings.AppSettings["email.exchange.domain"];
string domEnding =
ConfigurationSettings.AppSettings["email.exchange.domainending"];
string adminGroup =
ConfigurationSettings.AppSettings["email.exchange.admingroup"];

string fullName = "TestUser";
string alias = fullName ;
string password = fullName;
string createURL = "CN=" + mailboxStore + ",CN=" + storageGroup +
",CN=InformationStore,CN=" + server + ",CN=Servers,CN=" + adminGroup +
",CN=Administrative Groups,CN=" + organisation + ",CN=Microsoft
Exchange,CN=Services,CN=Configuration,DC=" + dom + ",DC=" + domEnding;
DirectoryEntry container, user;
CDOEXM.IMailboxStore mailbox;

//create new user
container = new DirectoryEntry("LDAP://cn=users,DC=" + dom + ",DC=" +
domEnding);
user = container.Children.Add("cn=" + fullName, "user");
user.Properties["sAMAccountName"].Add(alias);
user.CommitChanges();
user.Invoke("SetPassword", new object[]{password});

//enable new user
user.Properties["userAccountControl"].Value = 0x200;
user.CommitChanges();

//create mailbox
mailbox = (IMailboxStore)user.NativeObject;
mailbox.CreateMailbox(createURL);
user.CommitChanges();

I'm pretty sure my createURL is correct, and I am running this code under an
impersonated account that has Exchange View Administrator priviledges.

If anyone has any ideas on how to solve this, please let me know, I would be
very very grateful... and you'd save me from insanity too!

Cheers,
Mandy

Nov 19 '05 #1
0 2582

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Dave Spina | last post by:
I have been working with the System.DirectoryServices namespace and the CDOEXM COM objects in a recent project. After probing the CDOEXM object set for a while I noticed that beyond the usual...
4
by: Barry G Freeman | last post by:
I'm fairly new to C# and I need to be able to enumerate the storage groups and mailstores on our Exchange 2k server. So far, i've figured out that I need to ue CDOEXM which I've added as a COM...
0
by: Ingram Leedy | last post by:
Hi, I am using the example from Microsoft Knowledge Base Article - 313114, "HOW TO: Create a MailBox-Enabled Recipient by using C#.NET". The WindowsXP computer is part of the Microsoft 2003...
1
by: TM | last post by:
Greetings, I've more or less figured out how to get a list of users who have access to a particular user's mailbox (code below), but I'm stumped as to how to get a list of users that a particular...
0
by: TM | last post by:
Greetings, I've more or less figured out how to get a list of users who have access to a particular mailbox (code below), but I'm stumped as to how to get a list of mailboxes that a particular user...
8
by: Rob Edwards | last post by:
When trying to add the Microsoft CDO for Exchange Management Library (aka CDOEXM.dll) I receive the following message: "A reference to 'Microsoft CDO for Exchange Management Library' could not be...
0
by: KPipher | last post by:
Hello, I'm having trouble implementing the CDOEXM Namespace in an asp.net application (VB.NET). I've read many conflicting discussions surrounding the use of CDOEXM remotely and would appreciate...
1
by: lezeou | last post by:
Hi, I'm trying to write an ASP page to create a user with an Exchange Mailbox. The user is create very well but i've got this error message when i try to create the mailbox : error '80072020' ...
0
by: lezeou | last post by:
Hi, I've this error when i tried to create a Exchange Mailbox, with ASP +VBscript. The line is : "objMailbox.CreateMailbox MStore" Error -2147467259 Il n'y a pas d'accord de connexion...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.