We are getting following exception in event logs and it is crashing out AppPool. I have researched a lot but couldn't find any near reason or solution. Can any one please help on why this could be happening or how to debug and trace this.
An unhandled exception occurred and the process was terminated. Application ID: /LM/W3SVC/1/ROOT/MyApp Process ID: 15744 Exception: System.ArgumentOutOfRangeException Message: Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index StackTrace: at System.Collections.ArrayList.get_Item(Int32 index) at System.Web.SessionState.SessionStateItemCollection.get_Item(Int32 index) at System.Web.Util.AspCompatApplicationStep.AnyStaObjectsInSessionState(HttpSessionState session) at System.Web.HttpApplicationFactory.FireSessionOnEnd(HttpSessionState session, Object eventSource, EventArgs eventArgs) at System.Web.SessionState.SessionOnEndTargetWorkItem.RaiseOnEndCallback() at System.Web.Util.WorkItem.CallCallbackWithAssert(WorkItemCallback callback) at System.Web.Util.WorkItem.OnQueueUserWorkItemCompletion(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch()