Exception between C# and Outlook -


I have a simple code to open a compile email in Outlook 2013 using C #. It is a also works without issue when Outlook is not running, but when Outlook is already open, then I get this exception:

  'System.Runtime.InteropServices in mscorlib An unrestricted exception of type '.COMException' occurred. dll Additional information: gaining COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: The 80,080,005 failed server performance (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE) ).  

This is my simple code:

  Microsoft.Office.Interop.Outlook.Application app = new Microsoft.Office.Interop.Outlook.Application () ; Maikrosoftkofiskinteropkautlukkmalitem Malitem = Appkkreateitem (Maikrosoftkofiskinteropkautlukkolitemteepekolmailitem); MailItem.Subject = "This is the subject"; MailItem.To = "any@example.com"; MailItem.Body = "This is the message."; MailItem.Display (true);  

I also get them from the Visual Studio Output Window, which I do not know about symbols!

  Additional information: COM class factory failed due to the re-component with CLSID to get {0006F03A-0000-0000-C000-000000000046} following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)). 'MCPanel.vshost.exe' (CLR v4.0.30319: mCPanel.vshost.exe): Loaded 'C: \ Windows \ assembly \ GAC_MSIL \ Microsoft.Office.Interop.Outlook \ 15.0.0.0__71e9bce111e9429c \ Microsoft.Office.Interop. Outlook.dll '. The module was created without symbols. 'MCPanel.vshost.exe' (CLR v4.0.30319: mCPanel.vshost.exe): Loaded 'C: \ Windows \ assembly \ GAC_MSIL \ Office \ 15.0.0.0__71e9bce111e9429c \ office.dll'. The module was created without symbols. Type 'System.Runtime.InteropServices.COMException' A first chance exception type 'system.Runtime.InteropServices.COMException' of mscorlib.dll occurred in the exception of an unexpected mscorlib.dll additional information that came with: COM with components for COM The square factory is receiving CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80,080,005 server failed to execute (exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).  

Any help is appreciated? Thanks in advance

Most likely this is due to the difference in security references whether Outlook or your The app is running with high privileges?


Comments