在 AppHarbor 上等待:COMException,"Server execution failed"

WatiN on AppHarbor: COMException, "Server execution failed"

我在控制台应用程序中使用 WatiN。我将平台设置为 x86,并将 [STAThread] 添加到我的 Main.我确认该应用程序实际上是 运行 32 位模式(WatiN 需要)。

WatiN 在本地测试时工作正常,但在 AppHarbor 上 运行 时崩溃:

[COMException: Retrieving the COM class factory for component with CLSID {0002DF01-0000-0000-C000-000000000046} failed due to the following error: 80080005 Server execution failed (Exception from HRESULT: 0x80080005 (CO_E_SERVER_EXEC_FAILURE)).]

0007FFB8B2184B3 WatiN_Core!WatiN.Core.IE.CreateNewIEAndGoToUri(System.Uri, WatiN.Core.Interfaces.IDialogHandler, Boolean)+0x103

如何让 WatiN 在 AppHarbor 上运行?

为了能够 运行 WatIn,它需要(作为管理员)访问某些资源。当您 运行 一个 COM 对象时,它需要能够查询注册表以查明 Internet Explorer 是否是该系统中的 COM 对象以及它是否正在启动它。我没有使用 AppHarbor 的第一手经验,但我很确定他们不允许您查询他们的机器拥有哪些 COM 服务器,因此他们不会为您提供该访问权限。

要 100% 确定这一点,您应该询问他们是否可以访问他们计算机上的查询 COM 对象。

当您 运行 它在您的本地计算机上工作时,因为您以管理员身份登录或以管理员身份启动该进程。

希望对您有所帮助。