Announcement

Collapse
No announcement yet.

Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)) in Exchange

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED)) in Exchange

    Hi,
    I am getting an error while setting up MailboxRights for a user.


    Error : Catastrophic failure (Exception from HRESULT: 0x8000FFFF (E_UNEXPECTED))

    Env : Exchange 2003

    DLL used: CDOEXM.dll

    Code :


    DirectoryEntry objDEUser = ADXAUtility.GetDirectoryObjectByPath(strDistinguis hedPath);

    IExchangeMailbox newmbx;
    newmbx = (IExchangeMailbox)objDEUser.NativeObject;

    if (newmbx.HomeMDB == null)
    {
    throw new Exception("User called " + strUserDisplayName + " does not have an email account");
    }
    else
    {
    SecurityDescriptor oSecurityDescriptor = (SecurityDescriptor)objDEUser.MailboxrRights;
    newAce = new AccessControlEntryClass();
    dacl = (AccessControlList)oSecurityDescriptor.Discretiona ryAcl;
    foreach (IADsAccessControlEntry oACE in dacl)
    {
    if (oACE.Trustee.ToLower() == "" + strDomainName.ToLower() + "\\" + strAdditionalMailBoxUserName.ToLower() + "")
    {
    dacl.RemoveAce(oACE);

    }

    }
    //to remove old permisions for the particular user
    newmbx.MailboxRights = (SecurityDescriptor)oSecurityDescriptor;
    User.CommitChanges();


    newAce.Trustee = "" + strDomainName + "\\" + strAdditionalMailBoxUserName + "";
    newAce.AceFlags = (int)ADS_ACEFLAG_ENUM.ADS_ACEFLAG_INHERIT_ACE;
    newAce.AccessMask = intPermission;
    newAce.AceType = (int)ADS_ACETYPE_ENUM.ADS_ACETYPE_ACCESS_ALLOWED;

    dacl.AddAce(newAce);
    //to Add new permisions for the particular user
    newmbx.MailboxRights = (SecurityDescriptor)oSecurityDescriptor;
    objDEUser.CommitChanges();

    I have developed a web application to text this.If i run this application server machine where we have installed Exchange server and ACtivge Directiry , it is working fine.

    But if i run this application in from another windows 2003 server machine,it is thorowing above error.In this windows 2003 machine i have installed Exchange management tools and SP2 for Exchange 2003 server also installed.I logged into the machine with Domain Admin who has admin rights on Exchange Server machine.

    if any one knows solution for this issue,Can you share with me?.

    i am ready to try if we have alternate way to achive this.

    Please help me on this....

    Thanks in Advance.

    Aro.
    Last edited by aero.raj; 8th January 2008, 08:36. Reason: Code snipet was wrong.
Working...
X