xuxu1390
NET环境是1.1的,当使用sqlconnection对象并用open方法打开数据库连接时,就会产生如下异常信息:

System.NullReferenceException: 未将对象引用设置到对象的实例。 at LoadLibraryW(UInt16* ) at System.EnterpriseServices.Thunk.Security.Init() at System.EnterpriseServices.Thunk.Security.SuspendImpersonation() at System.EnterpriseServices.Platform.Initialize() at System.EnterpriseServices.ResourcePool..ctor(TransactionEndDelegate cb) at System.Data.SqlClient.ConnectionPool..ctor(DefaultPoolControl ctrl) at System.Data.SqlClient.PoolManager.FindOrCreatePool(DefaultPoolControl ctrl) at System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString options, Boolean& isInTransaction) at System.Data.SqlClient.SqlConnection.Open() at WLearningCommon.AuthorizationFactory.createAuthorization(String userid, String password, String currentrole) in f:\wlearning\wlearningcommon\authorizationfactory.cs:line 20 at WLearning.AjaxMethodLib.CheckUser.GetUserLogin(IJavaScriptObject Obj) in f:\wlearning\wlearning\ajaxmethodlib\checkuser.cs:line 34

  源码前段时间在机子上调试是完全正常的,竟然出来这种非常奇怪的错误!无语了

  后来,经过一番搜索,终于得知问题是出在操作系统上,需要为.NET环境打个补丁,那就是.NET Framework 1.1 SP1。
  .NET Framework 1.1 SP1 说明:Microsoft .NET Framework 1.1 Service Pack 1 (SP1) 主要的特点是改善了安全性。此外,此 Service Pack 还包括了针对自发布 Microsoft .NET Framework 1.1 以来报告的所有客户问题的累积修补程序。特别值得一提的是,SP1 对使用 WSDL 文档、防止数据执行和防范安全性问题(例如缓冲区溢出)提供了更好的支持。

分类:

技术点:

相关文章:

  • 2021-05-04
  • 2021-05-12
  • 2021-09-04
  • 2021-08-14
  • 2021-05-03
  • 2021-09-17
  • 2022-01-14
  • 2021-09-13
猜你喜欢
  • 2021-09-17
  • 2021-11-18
  • 2021-12-20
  • 2021-11-25
  • 2022-12-23
  • 2021-12-12
  • 2022-01-20
相关资源
相似解决方案