我的一个客户的Kentico-9网站似乎在随机的时间崩溃。
我检查了windows服务器错误日志,并找到了错误的堆栈跟踪。
Application: w3wp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
at System.Web.SessionState.SessionStateItemCollection.get_Item(Int32)
at System.Web.SessionState.HttpSessionStateContainer.get_Item(Int32)
at System.Web.Util.AspCompatApplicationStep.AnyStaObjectsInSessionState(System.Web.SessionState.HttpSessionState)
at System.Web.HttpApplicationFactory.FireSessionOnEnd(System.Web.SessionState.HttpSessionState, System.Object, System.EventArgs)
at System.Web.SessionState.SessionOnEndTargetWorkItem.RaiseOnEndCallback()
at System.Web.Util.WorkItem.CallCallbackWithAssert(System.Web.Util.WorkItemCallback)
at System.Web.Util.WorkItem.OnQueueUserWorkItemCompletion(System.Object)
at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)
at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch()
at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()
从那里,我已经设置了转储应用程序池进程到异常,希望它会导致更多的信息,但这似乎没有包含任何新的内容。
任何帮助将不胜感激。
1条答案
按热度按时间slsn1g291#
我们有完全相同的问题,并通过将我们的异步处理程序中的会话访问从只读改为rw来修复它。
从
IReadOnlySessionState
到IRequiresSessionState
正如建议的here,如果你在MVC中使用
[SessionState(SessionStateBehavior.ReadOnly)]
属性,这似乎也是相关的。