[英]0x80080005 In outlook 2013
I'm trying to build a simple outlook plugin using VS2013 and c# Is working fine for outlook 2010 but is crashing in outlook 2013 with this error at this line: 我正在尝试使用VS2013构建一个简单的Outlook插件,而C#对于Outlook 2010正常运行,但在Outlook 2013中崩溃,并在此行出现此错误:
Outlook.application o = new Outlook.Application();
Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)) 由于以下错误,检索具有CLSID {0006F03A-0000-0000-C000-000000000046}的组件的COM类工厂失败:80080005服务器执行失败(HRESULT异常:0x80080005(CO_E_SERVER_EXEC_FAILURE))
VS and outlook are running under same user, the OS is windows 7, same integrity level. VS和Outlook在同一用户下运行,操作系统是Windows 7,具有相同的完整性级别。
Thanks, Marius 谢谢,马吕斯
The following statements: 以下语句:
I'm trying to build a simple outlook plugin 我正在尝试构建一个简单的Outlook插件
and 和
Outlook.application o = new Outlook.Application(); Outlook.application o =新的Outlook.Application();
are incompatible! 不兼容!
You need to use the Application
property available in add-ins. 您需要使用加载项中提供的Application
属性。 If you develop a VSTO based add-in check out the Application property of the add-in class. 如果您开发基于VSTO的加载项,请检查加载项类的Application属性。
Anyway, the following error description states that you try to automate Outlook from a windows service: 无论如何,以下错误描述指出您尝试从Windows服务自动执行Outlook:
Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)) 由于以下错误,检索具有CLSID {0006F03A-0000-0000-C000-000000000046}的组件的COM类工厂失败:80080005服务器执行失败(HRESULT异常:0x80080005(CO_E_SERVER_EXEC_FAILURE))
Microsoft does not currently recommend, and does not support, Automation of Microsoft Office applications from any unattended, non-interactive client application or component (including ASP, ASP.NET, DCOM, and NT Services), because Office may exhibit unstable behavior and/or deadlock when Office is run in this environment. Microsoft当前不建议也不支持任何无人参与的非交互客户端应用程序或组件(包括ASP,ASP.NET,DCOM和NT Services)中的Microsoft Office应用程序自动化,因为Office可能表现出不稳定的行为和/在此环境中运行Office时出现死锁或死锁。
If you are building a solution that runs in a server-side context, you should try to use components that have been made safe for unattended execution. 如果要构建在服务器端上下文中运行的解决方案,则应尝试使用对无人值守执行安全的组件。 Or, you should try to find alternatives that allow at least part of the code to run client-side. 或者,您应该尝试找到允许至少部分代码在客户端运行的替代方法。 If you use an Office application from a server-side solution, the application will lack many of the necessary capabilities to run successfully. 如果您从服务器端解决方案中使用Office应用程序,则该应用程序将缺少许多成功运行所需的功能。 Additionally, you will be taking risks with the stability of your overall solution. 此外,您将承担整体解决方案稳定性的风险。 Read more about that in the Considerations for server-side Automation of Office article. 在《 服务器端Office自动化注意事项》一文中了解有关此内容的更多信息。
You may consider using a low-level code from a service instead - Extended MAPI or any third-party wrappers around that API. 您可以考虑使用服务中的低级代码-扩展MAPI或该API周围的任何第三方包装。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.