1

Topic: Not clear error

On the server that happens starts to produce permanently such error Index was outside the bounds of the array. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System. IndexOutOfRangeException: Index was outside the bounds of the array. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace: [IndexOutOfRangeException: Index was outside the bounds of the array.] System. Collections. Generic. List ` 1.Add (T item) +37 Site. Core. OnSessionStart (HttpSessionState s, HttpRequest r) +67 Site. Application. Session_Start () +53 [TargetInvocationException: Exception has been thrown by the target of an invocation.] System. RuntimeMethodHandle. InvokeMethod (Object target, Object [] arguments, Signature sig, Boolean constructor) +0 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal (Object obj, Object [] parameters, Object [] arguments) +87 System.Reflection.RuntimeMethodInfo.Invoke (Object obj, BindingFlags invokeAttr, Binder binder, Object [] parameters, CultureInfo culture) +101 System. Reflection. MethodBase. Invoke (Object obj, Object [] parameters) +21 System.Web.Util.ArglessEventHandlerProxy.Callback (Object sender, EventArgs e) +56 System.Web.SessionState.SessionStateModule.RaiseOnStart (EventArgs e) +9976119 System.Web.SessionState.SessionStateModule.CompleteAcquireState () +160 System.Web.SessionState.SessionStateModule.BeginAcquireState (Object source, EventArgs e, AsyncCallback cb, Object extraData) +1095 System.Web.AsyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute () +254 System. Web. HttpApplication. ExecuteStep (IExecutionStep step, Boolean& completedSynchronously) +155 code trivial public class Core {List <SessionEnvironment> _Environments; private Core (HttpApplication a, RouteCollection routes) {_Environments = new List <SessionEnvironment> ();} public void OnSessionStart (HttpSessionState s, HttpRequest r) {SessionEnvironment env = new SessionEnvironment (_Site, _GeoIPService, s, r); s ["environment"] = env; _Environments. Add (env);} what  an index?

2

Re: Not clear error

Hello, Barbar1an, you wrote: B> Index was outside the bounds of the array. B> Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. B> what  an index? About a multithreading forgot, List <T> not thread-safe... <<RSDN@Home 1.0.0 alpha 5 rev. 0>>

3

Re: Not clear error

Hello, rameel, you wrote: R> Hello, Barbar1an, you wrote: B>> Index was outside the bounds of the array. B>> Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. B>> what  an index? R> about a multithreading forgot, List <T> not thread-safe so to this code of 10 years and a problem 1 month and when it is shown that is shown stablly that not similar on a synchronization error

4

Re: Not clear error

Hello, Barbar1an, you wrote: B> so to this code of 10 years and a problem 1 month and when it is shown that is shown stablly that not similar on a synchronization error Well means to you carried or loading not such and competitive was... <<RSDN@Home 1.0.0 alpha 5 rev. 0>>

5

Re: Not clear error

Hello, rameel, you wrote: Here : using System; using System. Collections. Generic; using System. Threading; namespace ConsoleApp1 {class Program {static void Main () {var list = new List <object> (); for (var i = 0; i <40; i ++) {var thread = new Thread (() => {for (var j = 0; j <10000; j ++) {try {list. Add (null);} catch (Exception e) {Console. WriteLine ($ "{e} \r\n"); break;}}}); thread. Start ();} Console. ReadLine ();}}}... <<RSDN@Home 1.0.0 alpha 5 rev. 0>>