dln
Guest
|
Posted:
Wed Aug 17, 2005 12:47 am Post subject:
Can not mail enable group - "the server is unwilling to proc |
|
|
Hello all,
I'm trying to mail enable an already existing group on an Exchange 2003
server via C# using CDO and when I attempt to commit my changes, I get an
"the server is unwilling to process the request" error returned. I'm using
almost identical code to mail-enable a contact and it works, so I'm at a
loss to explain the error. The account the code is running as has the
appropriate rights delegated to it through both AD and the Exchange server.
If I use Active Directory Users and Computers, I can create, mail-enable,
and then delete any user, group or contact object under the delegated OU, so
it's obviously a problem with my code. Here's a snippet - maybe someone can
see something wrong...
static private ProcessingResult EnableGroup(DirectoryEntry group, string
emailAddress)
{
ProcessingResult result = ProcessingResult.prSuccess;
try
{
// "group" references a group that already exists in AD
IMailRecipient recipient = group.NativeObject as IMailRecipient;
recipient.MailEnable(String.Empty);
group.CommitChanges(); // this is where the exception is thrown
...
}
catch (Exception e)
{
result = ProcessingResult.prCreateFailed;
}
}
Along with the exception, I get a _COMPlusExceptionCode of 3762507597
(0xE0434F4D) and an HRESULT of 2147950645 (0x80072035).
I've been looking around the web for a solution to this problem and all I've
found for possible causes are either permissions on the object or some
required property hasn't been set. However, since I can modify the group
through AD Users and Computers, I don't think permissions is the problem.
Also, since the group has already been created and all I'm trying to do is
mail enable it, I would think that all the mandatory properties have already
been set - but I could be wrong about this. Does anybody have any ideas?
Thanks.
|
|