最近网站时常出现间隙性程序错误,有时候是好好的,好像突然一瞬间就有那个错误了,经常出现 列“XX”不属于"Table”,或是“未将对象引用设置到对象的实例”等等,但过一段时间又好了,重启服务器也没问题了,让人头疼的是特别是晚上11点以后基本属于瘫痪状态,白天访问却没什么问题,google,baidu收录的数据也直线下降。(程序是VS2008做的,数据库是sql2005)
各位大哥们帮帮忙,小弟定当感激不尽!

解决方案 »

  1.   

    异常描述:引发类型为“System.Web.HttpUnhandledException”的异常。错误源: 在 System.Web.UI.Page.HandleError(Exception e) 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 在 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 在 System.Web.UI.Page.ProcessRequest() 在 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) 在 System.Web.UI.Page.ProcessRequest(HttpContext context) 在 ASP.decoration_decorationjianjie_aspx.ProcessRequest(HttpContext context) 在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 异常描述:未将对象引用设置到对象的实例。错误源: 在 Fujia.WebApplication.Decoration.DecorationJianJie.Decoration_Load() 在 Fujia.WebApplication.Decoration.DecorationJianJie.Page_Load(Object sender, EventArgs e) 在 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) 在 System.Web.UI.Control.OnLoad(EventArgs e) 在 System.Web.UI.Control.LoadRecursive() 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)很多的都是类似这样的异常信息
      

  2.   

    你的DBHelper肯定是static的,
    改成非静态就好了
      

  3.   

    是不是某个Session丢失了,但是在程序中直接引用了?
    在Session引用前最好做一个是否为null的判断
      

  4.   

    你的DBHelper里面的函数都是静态的把。你把静态的去掉,这个是我曾经出现过的错误,间歇性的。你找3-5个人同时点一个连接,点上3分钟就能出现这个错误。
      

  5.   

    我当时就是把DBHelper类里面所有的静态都去掉了,再放到服务器上就没事了!!!