随笔-13  评论-29  文章-31  trackbacks-0

参看网址:

http://support.microsoft.com/?scid=kb;zh-cn;810245&spid=3039&sid=global

FIX:ASP 会话状态中的无效对象

文章编号 : 810245
最后修改 : 2003年6月9日
修订 : 1.0

症状

连接 .NET 的 Web 应用程序在会话状态中存储一个对象。当您让此应用程序空闲 12 到 20 分钟,然后再次尝试访问该对象时,您可能会收到一条指出发生了无效对象异常的错误消息,如下所示:
Server Error in '/TheTest Application' Application.

Object reference not set to an instance of an object.

Description:An unhandled exception occurred during the execution of the current web request.Please review the stack trace for more information about the error and where it originated in the code.

Exception Details:System.NullReferenceException:Object reference not set to an instance of an object.

解决方案

现在,您可以从 Microsoft 获得支持的修复程序,但它仅用于纠正本文所述的问题。只将它应用于出现这一特定问题的系统。

注意 您必须有 Visual Studio 许可协议才能获得此修复程序。

要想解决此问题,请与 Microsoft 产品支持服务联系以获得该修补程序。有关 Microsoft 产品支持服务电话号码和支持费用信息的完整列表,请访问下面的 Microsoft Web 站点:
http://support.microsoft.com/default.aspx?scid=fh;EN-US;CNTACTMS (http://support.microsoft.com/default.aspx?scid=fh;en-us;cntactms)
注意 特殊情况下,如果 Microsoft 支持专业人员确定只有专门更新才能解决您的问题,可免收支持电话的费用。对于不需要进行专门更新的问题以及其他支持查询,将正常收取费用。

这篇文章中的信息适用于:
Microsoft Visual Studio .NET 2002 专业版
Microsoft Visual Studio .NET (2002), Professional Edition SP1
Microsoft Visual Studio .NET 2002 企业级结构设计版
Microsoft Visual Studio .NET (2002), Enterprise Architect Edition SP1
Microsoft Visual Studio .NET 2002 企业级开发版
Microsoft Visual Studio .NET (2002), Enterprise Developer Edition SP1
posted on 2005-08-08 16:36 生活像一团麻 阅读(59973) 评论(7)  编辑 收藏 引用 所属分类: NET Programming

评论:
# re: 怎样解决 Object reference not set to an instance of an object. 2008-02-19 20:32 | conanhawke
??这不是Session过期么?怎么是Bug?  回复  更多评论
  
# re: 怎样解决 Object reference not set to an instance of an object. 2008-03-12 17:14 | xxx
垃圾,什么方法  回复  更多评论
  
# re: 怎样解决 Object reference not set to an instance of an object. 2008-06-11 01:33 | 夫妇发
Session值null经常引发这类错误;

解决办法就是少用或不用Session传参

  回复  更多评论
  
# re: 怎样解决 Object reference not set to an instance of an object. 2008-07-02 10:28 | g
如.NET版本为1.1,则进行安装Microsoft .NET Framework 1.1 Service Pack 1 补丁即可。
补丁下载地址:http://download.microsoft.com/download/8/b/4/8b4addd8-e957-4dea-bdb8-c4e00af5b94b/NDP1.1sp1-KB867460-X86.exe  回复  更多评论
  
# spzpw.net 2009-04-27 14:18 | spzpw
真的我也遇到这情况还是亏了www.spzpw.net 给地技术支持,是时感谢谢www.cdrcw.org给于技术指导与www.myzpw.cn给于最新的人才网提供动力  回复  更多评论
  
# re: 怎样解决 Object reference not set to an instance of an object.[未登录] 2010-03-29 10:21 | zz
请问楼上怎么解决的呢?  回复  更多评论
  
# re: 怎样解决 Object reference not set to an instance of an object. 2013-05-16 18:38 | MCNEILLEANNE24
It's great that we are able to receive the <a href="http://goodfinance-blog.com/topics/credit-loans">credit loans</a> and it opens new chances.   回复  更多评论
  
只有注册用户登录后才能发表评论。