“/”应用程序中的服务器错误。

未将对象引用设置到对象的实例。

说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.NullReferenceException: 未将对象引用设置到对象的实例。

源错误:


行 214:            List<Course> VideoCoures = CourseBLL.GetCourseByLecturerType(id, 1, 3);
行 215:            List<Course> kbCourses = CourseBLL.GetCourseByLecturerType(id, 2, 3);
行 216:            List<Course> linecourse = CourseBLL.GetCourseByLecturerType(id, 3, 3);
行 217:
行 218:            List<Course> courses = CourseBLL.GetWillCourseByLecturer(lecturer.ID, 5);

源文件: d:\devcode\www.tofun.cn\trunk\CRIC.Shanglv.Web.DiChanRen\CRIC.Shanglv.Web.DiChanRen\Areas\Education\Controllers\HomeController.cs    行: 216

堆栈跟踪:


[NullReferenceException: 未将对象引用设置到对象的实例。]
   CRIC.Shanglv.Web.DiChanRen.Areas.Education.Controllers.HomeController.Lecturer(Int64 id) in d:\devcode\www.tofun.cn\trunk\CRIC.Shanglv.Web.DiChanRen\CRIC.Shanglv.Web.DiChanRen\Areas\Education\Controllers\HomeController.cs:216
   lambda_method(Closure , ControllerBase , Object[] ) +141
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +266
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +34
   System.Web.Mvc.<>c__DisplayClass15.<InvokeActionMethodWithFilters>b__12() +78
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +453
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +632
   System.Web.Mvc.Controller.ExecuteCore() +144
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +93
   System.Web.Mvc.<>c__DisplayClassb.<BeginProcessRequest>b__5() +57
   System.Web.Mvc.Async.<>c__DisplayClass1.<MakeVoidDelegate>b__0() +25
   System.Web.Mvc.<>c__DisplayClasse.<EndProcessRequest>b__d() +54
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +431
   System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) +75
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +158


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.8.4075.0