System.Runtime.InteropServices.COMException (0x800706BE) when getting contact.LastName
Asked Answered
C

2

5

Some of our users are getting this exception sometimes (not for every contact):

System.Runtime.InteropServices.COMException (0x800706BE): 
   The remote procedure call failed. (Exception from HRESULT: 0x800706BE)
   at Microsoft.Office.Interop.Outlook._ContactItem.get_LastName()

This happens when we're trying to get the last name of a contact (of the ContactItem type).

Does anybody know what the problem is?

Any help would be appreciated. Thanks!

Chris answered 17/12, 2010 at 15:7 Comment(1)
Hi Andrei can you post some code.Pseudohermaphrodite
G
11

It is a Windows error, facility code 7. The last word gives the Windows error, 0x6be == 1726:

// MessageId: RPC_S_CALL_FAILED
//
// MessageText:
//
// The remote procedure call failed.
//
#define RPC_S_CALL_FAILED                1726L

Interop with Office programs like Outlook happens through out-of-process COM. RPC is the low-level Remote Procedure Call mechanism. There are several reasons for such a remote call to fail. Both the error code and the error name google well.

The simplest explanation is just that Outlook fell over. That happens. The advantage of in-process interop is that when the host program crashes then it will take out your code as well. Not in an out-of-process scenario, you just get a hard to diagnose error. Ask your customer's IT staff to use their typical Office troubleshooting strategies.

Gibberish answered 17/12, 2010 at 16:19 Comment(1)
If you got here because of Excel Interop it is probably because of "FoxitReader PDF Creator COM Plugin" see : https://mcmap.net/q/2031108/-excel-interop-workbooks-open-inconsistenciesGamopetalous
G
-1

set the full access to Network Services (or identity of apppool) to the folder C:\Windows\System32\config\systemprofile\AppData

Regards! Gabriel from Argentina

Galoshes answered 28/2, 2016 at 8:16 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.