我的 Web 应用程序遇到了令人沮丧的问题。当我在本地测试应用程序时,我没有任何异常,当我发布应用程序时,然后抛出许多空异常或类似“对象引用未设置为对象的实例。”。我不明白为什么。我使用托管http://1and1.pl/。有谁能够帮我?
堆栈跟踪:
[NullReferenceException:对象引用未设置为对象的实例。] QuestionnaireEx.Controllers.QuestionnaireController.TestStart(AttemptAnswers attA, String prevBtn) +7267 lambda_method(Closure , ControllerBase , Object[] ) +119 System.Web.Mvc.ActionMethodDispatcher .Execute(ControllerBase 控制器, Object[] 参数) +14 System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary
2 parameters) +182 System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary
2 参数) +27 System.Web.Mvc.Async.<>c_ DisplayClass42.b _41() + 28 System.Web.Mvc.Async.<> c_DisplayClass81.<BeginSynchronous>b__7(IAsyncResult _) +10 System.Web.Mvc.Async.WrappedAsyncResult
1.End() +50 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethod(IAsyncResult asyncResult) +32 System.Web.Mvc.Async.<>c _DisplayClass39。 b_33() +58 System.Web.Mvc.Async.<>c _DisplayClass4f.b_ 49() +225 System.Web.Mvc.Async.<>c _DisplayClass4f.b_ 49() +225 System.Web.Mvc.Async .<>c _DisplayClass37.b_ 36(IAsyncResult asyncResult) +10 System.Web.Mvc.Async.WrappedAsyncResult1.End() +50 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeActionMethodWithFilters(IAsyncResult asyncResult) +34 System.Web.Mvc.Async.<>c__DisplayClass2a.<BeginInvokeAction>b__20() +24 System.Web.Mvc.Async.<>c__DisplayClass25.<BeginInvokeAction>b__22(IAsyncResult asyncResult) +99 System.Web.Mvc.Async.WrappedAsyncResult
1.End() +50 System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult) +27 System.Web .Mvc.<>c _DisplayClass1d.b_ 18(IAsyncResult asyncResult) +14 System.Web.Mvc.Async.<>c _DisplayClass4.b_ 3(IAsyncResult ar) +23 System.Web.Mvc.Async.WrappedAsyncResult1.End() +55 System.Web.Mvc.Controller.EndExecuteCore(IAsyncResult asyncResult) +39 System.Web.Mvc.Async.<>c__DisplayClass4.<MakeVoidDelegate>b__3(IAsyncResult ar) +23 System.Web.Mvc.Async.WrappedAsyncResult
1.End() +55 System.Web.Mvc.Controller.EndExecute(IAsyncResult asyncResult) +29 System.Web.Mvc.Controller.System.Web.Mvc.Async.IAsyncController.EndExecute(IAsyncResult asyncResult) +10 System.Web .Mvc.<>c _DisplayClass8.b_ 3(IAsyncResult asyncResult) +25 System.Web.Mvc.Async.<>c _DisplayClass4.b__3(IAsyncResult ar) +23 System.Web.Mvc.Async.WrappedAsyncResult`1.End( ) +55 System.Web.Mvc.MvcHandler.EndProcessRequest(IAsyncResult asyncResult) +31 System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.EndProcessRequest(IAsyncResult 结果) +9 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication .IExecutionStep.Execute() +9629296 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155