随笔-27  评论-17  文章-1  trackbacks-4
  2008年4月17日

今天一同事在给客户的机器上安装系统的时候,出现了 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 匡匡 阅读(79) | 评论 (0)编辑
在开发WEB程序时,经常使用 showModalDialog 或 showModelessDialog 来显示一个对话框,显示出的对话框窗口是没有进去的效果,看起来就像一个 windows 程序一样,效果很不错。

但在开发时,还是经常使用 window.open 来打开一个网页,这显示的效果将会有一个进去的边框,如下图:



以后通过一行简单的 CSS 把这个进去的边框给去掉:
html { border:0px; }

效果如下图:

posted @ 2008-04-17 23:23 匡匡 阅读(95) | 评论 (0)编辑