Server Error in '/' Application.

Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

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.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index

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:


[ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index]
   System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource) +69
   System.Collections.Generic.List`1.set_Item(Int32 index, T value) +12737269
   UTU.BLL.PlayersGame.LoadGame(Pairing pairing) in C:\Users\neil\Dropbox\UTU Code\UTU App\UTU - BLL\Support\PlayersGame.cs:175
   UTU.BLL.<>c.<LoadGames>b__10_0(Pairing pairing) in C:\Users\neil\Dropbox\UTU Code\UTU App\UTU - BLL\Players.cs:121
   System.Threading.Tasks.<>c__DisplayClass31_0`2.<ForEachWorker>b__0(Int32 i) +64
   System.Threading.Tasks.<>c__DisplayClass17_0`1.<ForWorker>b__1() +1006
   System.Threading.Tasks.Task.InnerInvoke() +74
   System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) +18
   System.Threading.Tasks.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object <p0>) +209

[AggregateException: One or more errors occurred.]
   System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) +4247326
   System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) +12586685
   System.Threading.Tasks.Task.Wait() +16
   System.Threading.Tasks.Parallel.ForWorker(Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) +756
   System.Threading.Tasks.Parallel.ForEachWorker(IList`1 list, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally) +241
   System.Threading.Tasks.Parallel.ForEachWorker(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally) +260
   System.Threading.Tasks.Parallel.ForEach(IEnumerable`1 source, Action`1 body) +113
   UTU.BLL.Players.LoadGames(Int32 round) in C:\Users\neil\Dropbox\UTU Code\UTU App\UTU - BLL\Players.cs:119
   UTU.BLL.Tournament.CopyFromAndLoad(TournamentDTO dto, Int32 round) in C:\Users\neil\Dropbox\UTU Code\UTU App\UTU - BLL\Tournament.cs:421
   UTUResultsSite.PairingPage.Page_Load(Object sender, EventArgs e) in C:\Users\neil\Dropbox\UTU Code\UTU Website - Results\PairingPage.aspx.cs:19
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +52
   System.Web.UI.Control.OnLoad(EventArgs e) +97
   System.Web.UI.Control.LoadRecursive() +61
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +693


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4494.0