奇怪的 Object reference not set to an instance of an object

今天一同事在给客户的机器上安装系统的时候,出现了 Object reference not set to an instance of an object, 但从调用的堆椎上看,是从 .net framework 中抛出的异常:

[NullReferenceException: Object reference not set to an instance of an object.]
   LoadLibraryW(UInt16* ) +0
   System.EnterpriseServices.Thunk.Security.Init() +76
   System.EnterpriseServices.Thunk.Security.SuspendImpersonation() +81
   System.EnterpriseServices.Platform.Initialize() +503
   System.EnterpriseServices.ResourcePool..ctor(TransactionEndDelegate cb) +11
   System.Data.SqlClient.ConnectionPool..ctor(DefaultPoolControl ctrl) +797
   System.Data.SqlClient.PoolManager.FindOrCreatePool(DefaultPoolControl ctrl) +170
   System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) +358
   System.Data.SqlClient.SqlConnection.Open() +384


LoadLibrary 函数中引发的异常, 这应该是不能加载 SQL SERVER 的 DLL。
但 SQL SERVER 使用很正常,害得这同事找了一个下午。

最后发现在是卡巴司机杀毒软件的问题,关掉就好了。

网上找了一下资料,很少人遇到这种情况:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1488072&SiteID=1
http://bbs.et8.net/bbs/showthread.php?t=851817

posted @ 2008-05-04 20:13  匡匡  阅读(4392)  评论(1编辑  收藏  举报