获取 contact.LastName 时出现 System.Runtime.InteropServices.COMException (0x800706BE)

发布于 2024-10-08 06:55:24 字数 362 浏览 2 评论 0原文

我们的一些用户有时会遇到此异常(并非每个联系人):

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

当我们尝试获取联系人(ContactItem 类型)的姓氏时,就会发生这种情况。

有人知道问题是什么吗?

任何帮助将不胜感激。谢谢!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

南巷近海 2024-10-15 06:55:24

这是一个 Windows 错误,设施代码 7。最后一个字给出了 Windows 错误,0x6be == 1726:

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

与 Outlook 等 Office 程序的互操作通过进程外 COM 发生。 RPC 是低级远程过程调用机制。这种远程调用失败的原因有多种。错误代码和错误名称谷歌一下都很好。

最简单的解释就是 Outlook 崩溃了。就会发生这种情况。进程内互操作的优点是,当主机程序崩溃时,它也会删除您的代码。不是在进程外场景中,您只会遇到难以诊断的错误。要求客户的 IT 员工使用他们典型的 Office 故障排除策略。

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.

林空鹿饮溪 2024-10-15 06:55:24

将网络服务(或应用程序池的标识)的完全访问权限设置为文件夹 C:\Windows\System32\config\systemprofile\AppData

问候!
加布里埃尔(来自阿根廷)

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

Regards!
Gabriel from Argentina

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文