none
Cannot create MAPI.Session on windows 2008 R2 RRS feed

  • Question

  • In my application I use CDO 1.1.2 to send Mail messages from multiple Exchange account. Recently I faced the following problem. When I impersonate running thread under account that differs from application process owner and has no administrative rights I cannot create object MAPI.Session. Calling

    CComPtr<MAPI::_Session> pMAPISession;

    rc = pMAPISession.CoCreateInstance(OLESTR("MAPI.Session"));

    gives rc is equal -2147221234 (0x8004010E). On the other hand if account being impersonated has admin rights object is created, but application fails. This feature takes place on operation system Windows Server 2008 R2. On windows XP all work well. How can I fix this issue?

    Alexander

    Wednesday, September 12, 2012 10:53 AM

All replies

  • It's a long time since I used CDO, but since you are having a problem with non-admin use, I'd check the registry to see where it wants to create its temporary files, and make sure that non-admin users have permission to create files there.  The thing is, if it hasn't been configured to use a specific folder, it will try to create them in the System32 folder by default.

    Mobile OWA For Smartphone
    www.leederbyshire.com
    email a@t leederbyshire d.0.t c.0.m

    Thursday, September 13, 2012 12:45 PM
  • Alexander,

    I'd look seriously at moving across to Exchange Web Services (CDO is ancient history).

    You'll have to make the move sooner or later.

    Regards,

    Scott Quinn


    Scott Quinn | C# developer & messaging specialist (for hire). Contact me at http://au.linkedin.com/in/scottquinn

    Monday, September 17, 2012 12:12 AM