Microsoft.Office.Interop.Outlook.Application does not work on server RRS feed

  • Question

  • Hi

    .net core we want to open outlook message window in our project, it works locally but gives the following error on the server

    Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80070005 Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

    we installed outlook 2016 on the server computer.

    I used the following codes

     Microsoft.Office.Interop.Outlook.Application oApp = new Microsoft.Office.Interop.Outlook.Application();
                    Microsoft.Office.Interop.Outlook.MailItem oMsg =

                    oMsg.BodyFormat = Microsoft.Office.Interop.Outlook.OlBodyFormat.olFormatHTML;
                    oMsg.CC = "";
                    string body = "test";
                    oMsg.HTMLBody = body;


    continues to fail. Please can you help with this.
    Thank you from now

    Monday, March 2, 2020 8:48 AM