永发信息网

应用程序中的服务器错误 未将对象引用设置到对象的实例。错误出在哪?

答案:1  悬赏:30  手机版
解决时间 2021-05-01 05:39
  • 提问者网友:雾里闻花香
  • 2021-04-30 06:05
源错误:

执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

堆栈跟踪:

[NullReferenceException: 未将对象引用设置到对象的实例。] SchoolDAL.ZhuanYeServer.GetZhuanYeMess(String ZhuanYeType, Int32 topNum) in C:\Documents and Settings\Administrator\桌面\tengda\tengda\SchoolDAL\ZhuanYeServer.cs:22 SchoolBLL.ZhuanYeManager.GetZhuanYe(String zhuanyeType, Int32 topNum) in C:\Documents and Settings\Administrator\桌面\tengda\tengda\SchoolBLL\ZhuanYeManager.cs:20 [TargetInvocationException: 调用的目标发生了异常。] System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +0 System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) +72 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) +371 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +29 System.Web.UI.WebControls.ObjectDataSourceView.InvokeMethod(ObjectDataSourceMethod method, Boolean disposeInstance, Object& instance) +480 System.Web.UI.WebControls.ObjectDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1960 System.Web.UI.WebControls.ListControl.OnDataBinding(EventArgs e) +92 System.Web.UI.WebControls.ListControl.PerformSelect() +31 System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70 System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82 System.Web.UI.WebControls.ListControl.OnPreRender(EventArgs e) +26 System.Web.UI.Control.PreRenderRecursiveInternal() +86 System.Web.UI.Control.PreRenderRecursiveInternal() +170 System.Web.UI.Control.PreRenderRecursiveInternal() +170 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041
最佳答案
  • 五星知识达人网友:笑迎怀羞
  • 2021-04-30 06:18
你的对象为Null或者没有实例化出来哈
我要举报
如以上回答内容为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
点此我要举报以上问答信息
大家都在看
推荐资讯