473,403 Members | 2,366 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,403 software developers and data experts.

Error when creating mailbox with CreateMailBox method.

I am using C# and ASP.Net to create users and mailboxes. I can create
an user without any problems but the code Blows up when i try to
create a mailbox. Here is the code snippet is am using

DirectoryEntry de = new DirectoryEntry();
DirectoryEntry ParentEntry = new DirectoryEntry();
CDOEXM.IMailboxStore Mailbox;

ParentEntry.Username = username;
ParentEntry.Password = password;
ParentEntry.AuthenticationType = AuthenticationTypes.Secure;
ParentEntry.Path = aDPathPrefix + aDPathSuffix;

de = ParentEntry.Children.Add("cn=" + commonName, "user");
de.Properties["sAMAccountName"].Add(sAMAccountName);
de.CommitChanges();

//This enables the new user.
de.Properties["userAccountControl"].Value = 0x200;
//ADS_UF_NORMAL_ACCOUNT
de.CommitChanges();

Mailbox = (CDOEXM.IMailboxStore) de.NativeObject;
Mailbox.CreateMailbox(aDHomeMDB);
de.CommitChanges();
I get an error "System.Runtime.InteropServices.COMException: An
operations error occurred." on this line
"Mailbox.CreateMailbox(aDHomeMDB);" of my code. I am using
impersonation in my ASP.Net app and the user i am impersonating is a
domain admin. The environment i am working in is C#, ASP.NET, .net
framework 1.1 and Exchange 2003. I have verified the value of the
HomeMDB using ADISEdit utility and it is correct. I have installed
exchange tools on my machine. Any one out there who has an idea
regarding the permissions that have to be setup in ASP.NET to create a
mail box, please feel free to help me out.

Thanks.

-Jamali
Nov 16 '05 #1
0 1264

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

Similar topics

0
by: eri050 | last post by:
I get this error when trying to create a mailbox in VB.NET "System.Runtime.InteropServices.COMException: There is no such object on the server" I have added the CDOEXM dll I have created the...
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: B. Zuidgeest | last post by:
I use C# to connect a database with student information directly to the Active Directory (2003). This means that as the student is enlisted an account and mailbox is created in the active...
0
by: Mandy | last post by:
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...
0
by: Flens | last post by:
Hi, I have code that worked until we upgraded from Exchange 2000 to Exchange 2003 and I now get a catastrophic failure at CreateMailbox (COMException (0x080004005)) I have updated the...
5
by: Michael | last post by:
Hello, I've created an ASP web page where users in our organization can create Active Directory computer accounts. The web page is running on a Server 2003 SP1 IIS 6 installation. The...
0
by: arjen1984 | last post by:
I want to create a mailbox-enabled mailbox. First i have used the toturial from microsoft: http://support.microsoft.com/kb/313114 Then my homeMDB string was incorrect. I saw an article , link:...
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: rage2001 | last post by:
I have a script (ASP) written which creates an account in AD, creates a folder on our file server and sets its permissions, and then creates a mailbox on the exchange server and sets its...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.