0

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()

Vishal Anand
  • 1,431
  • 1
  • 15
  • 32
  • At some point in your code there's an attempt to access an ArrayList with an index that's outside of the range of said ArrayList. I.e. the ArrayList might've had 10 items, the highest index is 9. Attempting to access the ArrayList on index 10, that Exception will occurr. Please note that this question in its current form is not fit for StackOverflow since there's no code. – Seth Nov 09 '22 at 12:22
  • @seth Have you closed this question? – Vishal Anand Nov 09 '22 at 12:51
  • 1
    I cannot close questions. :) – Seth Nov 09 '22 at 12:54
  • Have you looked at the linked duplicate ? – Rohit Gupta Nov 11 '22 at 04:52

0 Answers0