title: Index was outside the bounds of the array in ASP.Net Web API
body: <p>I am getting the below error with one of my Web API service:</p>
  
  <pre><code>"Message": "An error has occurred.",
  "ExceptionMessage": "Index was outside the bounds of the array.",
  "ExceptionType": "System.IndexOutOfRangeException",
  "StackTrace": "   at System.Collections.Generic.List`1.Add(T item)
  at System.Data.Linq.SqlClient.SqlConnectionManager.UseConnection(IConnectionUser user)
  at System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
  at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
  at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
  at System.Data.Linq.DataContext.ExecuteMethodCall(Object instance, MethodInfo methodInfo, Object[] parameters)
  </code></pre>
  
  <hr>
  
  <p>This error doesn't come while testing from RestClient for some time but if we start load testing on it, this error arises.</p>
  
  <p>I am unable to resolve the issue so for fixing, I have done some changes in the connection string as below:</p>
  
  <pre><code>connectionString="Integrated Security=false;Persist Security Info=False;
  Initial Catalog=xyz;Data Source=SQLSERVER1;User Id=sa;Password=****;
  MultipleActiveResultSets=True;Asynchronous Processing=true; Connection Timeout=2147483647;
  Pooling=true; Max Pool Size=200; Connection Lifetime = 0; ConnectRetryCount=2;
  ConnectRetryInterval=2;"
  </code></pre>
  
  <p>Have I missed something somewhere? </p>