WatiN、NUnit和CruiseControl.NET-错误消息800704a6

WatiN、NUnit和CruiseControl.NET-错误消息800704a6,nunit,cruisecontrol.net,watin,comexception,Nunit,Cruisecontrol.net,Watin,Comexception,通过CruiseControl.NET(作为服务)在NUnit和WatiN中运行一组测试时,出现以下错误: SetUp : System.Runtime.InteropServices.COMException : Creating an instance of the COM component with CLSID {0002DF01-0000-0000-000-000000000046} from the IClassFactory failed due to the followin

通过CruiseControl.NET(作为服务)在NUnit和WatiN中运行一组测试时,出现以下错误:

SetUp : System.Runtime.InteropServices.COMException : 
Creating an instance of the COM component with CLSID
{0002DF01-0000-0000-000-000000000046} from the IClassFactory 
failed due to the following error: 800704a6.
TearDown : System.NullReferenceException : Object reference 
not set to an instance of an object. 
这个错误一直是调试的噩梦,因为它不一致(25%的时间发生),并且不可再现。有人有类似的问题吗

AFAIK WatiN需要一个用户(即桌面)会话才能工作。因此,我的猜测是:

  • 您正在以普通用户帐户运行CruiseControl.Net服务
  • 此帐户(通常)登录到承载CruiseControl.Net的服务器
  • 当没有可用的桌面会话时,测试失败
过去勾选“允许服务与桌面交互”(服务属性,标签“登录”)就足够了,但我不确定这在Vista之后是否仍然有效。有效的方法是(以一种丑陋、骇人的方式)从控制台运行CruiseControl.Net,在桌面会话中运行,而不是作为服务运行。

重新启动机器 windows更新妨碍了实例化新的COM对象

在查看ServerFault和StackOverflow之后,我发现了几篇文章提到了
800704a6
错误代码

特别是这一次,它让我觉得很有意思,说明错误代码是
error\u SHUTDOWN\u ischeduled

我也犯了同样的错误:

使用CLSID创建COM组件的实例
来自IClassFactory的{0002DF01-0000-0000-000-0000000000 46}
由于以下错误而失败:800704a6

感谢您的回复--您知道为什么测试会运行(并通过)75%的时间吗?